Académique Documents
Professionnel Documents
Culture Documents
2. If data is expected in XML/JSON format, it can be done via Servlet using do Get/do Post
methods, request/response properties and it is done. Easy replacement is REST API.
create object at server side and return the object values (state) in form of JSON/XML.
REST is Stateless :
http://www.test.com/abc.html - State 1
http://www.test.com/abc/xyz.html - State 1
Note:
https://sling.apache.org/documentation/bundles/rendering-content-default-get-
servlets.html
https://github.com/apache/sling-old-svn-
mirror/blob/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/i
mpl/DefaultGetServlet.java
• Go to http://localhost:4506/system/config/configMgr
• Search for Get Servlet, open the below service.
• You can configure the above service to block the XML/JSON representation as well .
http://localhost:4506/content/geometrixx-outdoors/en/men.json
http://localhost:4506/content/geometrixx-outdoors/en/men.1.json
http://localhost:4506/content/geometrixx-outdoors/en/men.xml
In Apache Sling each (http) request is mapped onto a JCR resource, i.e. a repository node.
/content/ideawebsite – path
.html – extension
Note: Goto the path, if relative path, Checks in apps then libs. [Apache Sling Resource Resolver Factory –
Check in http://localhost:4506/system/console/conifigMgr ]
• ideapage.html
• ideapage.jsp
• html.jsp
• idea.jsp
• idea.html.jsp
• GET.jsp
Hit Again
Hit Again
Hit Again
Hit Again
http://localhost:4506/content/ideawebsite.idea.html/testing/additon?a=10&b=30
Selector : idea (some more information about the page) (server side :
request.getServerInfo().getSelector()) - Cached
Extension : html