Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have problems with creating a content node with cURL. I execute the following command:

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

But I can't see http://localhost:8080/content/mynode.html as there is showed the following problem:

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 has following content:

{"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"}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
262 views
Welcome To Ask or Share your Answers For Others

1 Answer

The html output that you get is correct, it's the default Sling HTML rendering.

You probably haven't executed the "Render your content using server-side javascript (ESP)" steps at http://sling.apache.org/documentation/getting-started/discover-sling-in-15-minutes.html which will setup a custom HTML rendering that's more useful.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...