Posts

Showing posts from May, 2025

Apache Sling : Servlets and Scripts in AEM 6.5 & AEMCS

Image
  Hello Everyone,   Sling Servlets is one of the very useful concepts in AEM. How much we know and use it, It has a lot more to know about it.   So In this blog, I will start with basics and will walk you through all the options and varieties of Sling Servlets with hands-on examples. Servlet Registration To register a servlet the following properties play a vital role. 1. sling.servlet.paths : A list of absolute paths under which the servlet is accessible as a Resource. The property value must either be a single String, an array of Strings or a Vector of Strings. A servlet using this property might be ignored unless its path is included in the Execution Paths (servletresolver.paths) configuration( Apache Sling Servlet/Script Resolver and Error Handler ) setting of the SlingServletResolver service. @Component(service = Servlet. class ,       property = {              ...