How can we customize ootb slingservlet in AEM | Community
Skip to main content
aemuser40900
Level 2
September 20, 2018

How can we customize ootb slingservlet in AEM

  • September 20, 2018
  • 3 replies
  • 4862 views

Hi,
If we require to make changes in the OOTB servlet, then we may require to look for the script making the ajax servlet call and there we can call our custom servlet.
Was thinking if its possible to trigger custom servlet instead of existing servlet ootb for given paths/ resource type. Similar to using service ranking property. What does Adobe recommends when there is a need to customize ootb servlet.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

smacdonald2008
Level 10
September 20, 2018

You can create your own servlets using the API. We have many HELPX artilces that show use of creating Sling Servlets - like this one:

Adobe Experience Manager Help | Invoking an Adobe Experience Manager Custom 6.4 Workflow from a web page

This Servlet invokes a Workflow - but it shows you how to create an AEM Sling Servlet for AEM 6.4.

akhoury
Adobe Employee
Adobe Employee
September 20, 2018

akashdeepm40900243​ the general recommendation is to avoid customizing the OOTB servlets.  What is your requirement?  Perhaps there is some other way to solve this.

However, if you find you absolutely need to override the OOTB servlet then this article does a good job of explaining how to do so:

http://www.computepatterns.com/153/overriding-out-of-the-box-servlet-in-aem-sling/

Ratna_Kumar
Level 10
September 21, 2018

Hi Akash,

The best way is to create your own servlet using API's as Scott recommended. Also we have so many HELPX articles on this topics. Here the couple of below.

Adobe Experience Manager Help | Invoking an Adobe Experience Manager Custom 6.4 Workflow from a web page

Creating Adobe Experience Manager 6.4 Sling Servlets that invoke MBean operations

Hope this helps!!

Thanks,

Ratna Kumar.