-1

我在使用 cURL 创建内容节点时遇到问题。我执行以下命令:

curl -u admin:admin -F"sling:resourceType=foo/bar" -F"title=some title" http://localhost:8080/content/mynode

但我看不到http://localhost:8080/content/mynode.html,因为显示了以下问题:

Resource dumped by HtmlRendererServlet

Resource path: /content/mynode
Resource metadata: {sling.resolutionPathInfo=.html, sling.resolutionPath=/content/mynode}
Resource type: foo/bar
Resource super type: -

Resource properties

title: some title
sling:resourceType: foo/bar
jcr:createdBy: admin
jcr:created: 

http://localhost:8080/content/mynode.json有以下内容:

{"title":"some title","sling:resourceType":"foo/bar","jcr:createdBy":"admin","jcr:created":"Thu Jul 04 2013 21:24:36 GMT+0300","jcr:primaryType":"sling:Folder"}
4

1 回答 1

1

您得到的 html 输出是正确的,它是默认的 Sling HTML 呈现。

您可能尚未在http://sling.apache.org/documentation/getting-started/discover-sling-in-15-minutes.html执行“使用服务器端 javascript (ESP) 呈现您的内容”步骤将设置一个更有用的自定义 HTML 渲染。

于 2013-07-05T10:32:02.833 回答