Hi,
to work with a JSP in Sling I mounted it to the Sling resource tree
using "<Sling-Initial-Content>", "<mountByFS>true</mountByFS>" and so on
in the pom.xml [1].
Now I would like to modify that JSP [2] using a servlet [3].
The servlet gets called and there I can modify the JSP content by
changing and saving the corresponding node.
But the change doesn't end up in the JSP. Do I use the right approach?
I only found one [4] documentation about that. Is there more that I
haven't seen yet?
One reason might be, that I use
`Resource contentResource = resource.getChild("jcr:content");`
in PUT.java:72 to get the resource and do the subsequent change because
´resource.adaptTo(Node.class);´ in line 75 returns null.
Does somebody have an idea on how to change the JSP using the servlet?
Any hint is appreciated!
Best,
Sandro
[1] -
https://github.com/sandroboehme/jcrbrowser/blob/master/jcrbrowser/pom.xml
[2] -
https://github.com/sandroboehme/jcrbrowser/blob/master/jcrbrowser/src/main/resources/SLING-INF/libs/sling/servlet/default/jcrbrowser/dhtml.jsp
[3] -
https://github.com/sandroboehme/jcrbrowser/blob/master/jcrbrowser/src/main/java/org/sboehme/jcrbrowser/PUT.java
[4] -
http://sling.apache.org/documentation/bundles/accessing-filesystem-resources-extensions-fsresource.html