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

Adding custom execution path in Servlet Resolver

Level 3
Level 3


I have created a Sling servlet and I need to register it using some custom path, e.g, /aem/testServlet

If I add this execution path entry in configuration "Apache Sling Servlet/Script Resolver and Error Handler", it works fine. But I need to create a custom configuration of this path for my project so that it can be deployed with the code.

Can anyone please help with this.

3 Replies
Level 3
Level 3


You can create a OSGI Config and include in ur codebase.


with ur custom paths under servletresolver.paths

Level 3
Level 3

I have already created this custom config and added the execution paths. But still it's picking up the OOTB SlingServletResolver, and my execution path is not getting registered.

Level 2
Level 2

Create an XML file with name in config folder.

Add servletresolver.paths property with your custom paths as specified below.


<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="" xmlns:jcr=""


Note: If you have already configured this manually in config manager console, and later trying to configure through code will not work. As, AEM tries to read from system rather from config folder.

In this case you have to delete the paths created in the CRX and then the paths will get configured through config folder.