User:Lindenb/Notebook/UMR915/20110616

=SLING= download sling standalone http://mirror.mkhelif.fr/apache//sling/org.apache.sling.launchpad-6-standalone.jar 35.1 (Mo)

Start the server: java -jar org.apache.sling.launchpad-6-standalone.jar 16.06.2011 21:32:54.972 *INFO* [main] Setting sling.home=sling (default) 16.06.2011 21:32:54.974 *INFO* [main] Starting Sling in sling (/home/lindenb/tmp/SLING/sling) 16.06.2011 21:32:55.001 *INFO* [main] Checking launcher JAR in folder sling 16.06.2011 21:32:55.022 *INFO* [main] Installing new launcher: jar:file:/home/lindenb/tmp/SLING/org.apache.sling.launchpad-6-standalone.jar!/resources/org.apache.sling.launchpad.base.jar, 2.3.0 (org.apache.sling.launchpad.base.jar.1308252775021) 16.06.2011 21:32:55.023 *INFO* [main] Loading launcher class org.apache.sling.launchpad.base.app.MainDelegate from org.apache.sling.launchpad.base.jar.1308252775021 16.06.2011 21:32:55.067 *INFO* [main] Starting launcher ... 16.06.2011 21:32:55.073 *INFO* [main] HTTP server port: 8080 16.06.2011 21:32:57.722 *INFO* [main] Startup completed



$ curl -u admin:admin -F"sling:resourceType=fo-F"title=MyTitle" http://localhost:8080/content/mynode    Content created /content/mynode     Go Back     Modified Resource     Parent of Modified Resource

Looking at: http://localhost:8080/mynode/sling:resourceType returns a text/plain file: foo/bar Looking at: http://localhost:8080/mynode/title returns a text/plain file: MyTitle http://localhost:8080/mynode/ returns a 403

http://localhost:8080/content/mynode.html returns 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: MyTitle

sling:resourceType: foo/bar

jcr:primaryType: nt:unstructured

http://localhost:8080/content/mynode.json returns: { "title":"MyTitle", "sling:resourceType":"foo/bar", "jcr:primaryType":"nt:unstructured" }

http://localhost:8080/content/mynode.xml returns:  <mynode jcr:primaryType="nt:unstructured" sling:resourceType="foo/bar" title="MyTitle" xmlns:ocm="http://jackrabbit.apache.org/ocm" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:slingevent="http://sling.apache.org/jcr/event/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:rep="internal" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"/>

curl -X MKCOL -u admin:admin http://localhost:8080/apps/foo ( -X/--request Specify request command to use ) curl -X MKCOL -u admin:admin http://localhost:8080/apps/foo/bar

edit file: html.esp: <%= currentNode.title %>  upload html.esp curl -u admin:admin -T html.esp http://localhost:8080/apps/foo/bar/html.esp

now http://localhost:8080/mynode.html returns: MyTitle 

Trying SVG:  	 <%= currentNode.title %>

curl -u admin:admin -T html.esp http://localhost:8080/apps/foo/bar/svg.esp fails to returns the SVG doc. The HTML document is returned ,not SVG.