Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Register Multiple Selectors in AEM Servlet


Level 6

* Register Multiple Selectors in Servlet.
@component(service = Servlet.class, immediate = true, property = { "description=Multiple Selectors Servlet",
ServletResolverConstants.SLING_SERVLET_METHODS + "=" + HttpConstants.METHOD_GET,
ServletResolverConstants.SLING_SERVLET_RESOURCE_TYPES + "=sling/servlet/default",
ServletResolverConstants.SLING_SERVLET_SELECTORS + "=selector1",
ServletResolverConstants.SLING_SERVLET_SELECTORS + "=selector2",
ServletResolverConstants.SLING_SERVLET_EXTENSIONS + "=json" })
public class MultipleSelectorServlet extends SlingSafeMethodsServlet {

private static Logger log = LoggerFactory.getLogger(MultipleSelectorServlet.class);

protected void doGet(final SlingHttpServletRequest req, final SlingHttpServletResponse resp)
throws ServletException, IOException {
try {


Page path to accessing the same page with different selectors in the same servlet.





Thank You.


Keshav Chaurasiya

0 Replies



@kchaurasiya, I am not very clear with this. Can you please help me understand this Q more? 


Community Advisor

This is the approach that should be used to register a sling servlet with multiple selector.

@kchaurasiya I believe this is just an idea here not a question for community.



Level 6

@asutosh_jena Thanks . I put it under discussion and next time i will keep under idea.