我在使用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"}
答案 0 :(得分:1)
您获得的html输出是正确的,它是默认的Sling HTML呈现。
你可能还没有在http://sling.apache.org/documentation/getting-started/discover-sling-in-15-minutes.html处执行“使用服务器端javascript(ESP)渲染你的内容”步骤,这将设置一个更有用的自定义HTML渲染。