Tuesday 26 May 2015

How to register Sling Servlet on the basis of Paths property



Hi,

We often create a Sling Servlet  and register that Servlet as per path property as below :



And we get the response 403 with error message after invoking the Servlet as like http://localhost:4502/aemcorner/demoservlet :


It generally happens when you Servlet path is not register under sling execution paths. OSGi provide the configuration Apache Sling Servlet/Script Resolver and Error Handler via Felix console to register Servlet path under Sling Execution paths.

Add the execution path as show below, After that CQSE will identify the Servlet Execution for that specific path.


            

Hope this will help and consider when you will register the Servlet for specific path.

Thanks