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
BedrockMission!

Learn More

View all

Sign in to view all badges

How can we customize ootb slingservlet in AEM

Avatar

Avatar
Boost 5
Level 2
akashdeepm40900
Level 2

Likes

7 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 2
akashdeepm40900
Level 2

Likes

7 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
akashdeepm40900
Level 2

20-09-2018

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.

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

20-09-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 ...

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

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

20-09-2018

Avatar

Avatar
Give Back 5
Employee
Andrew_Khoury
Employee

Likes

75 likes

Total Posts

93 posts

Correct Reply

33 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
Andrew_Khoury
Employee

Likes

75 likes

Total Posts

93 posts

Correct Reply

33 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
Andrew_Khoury
Employee

20-09-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/

Avatar

Avatar
Validate 25
MVP
Ratna_Kumar
MVP

Likes

158 likes

Total Posts

755 posts

Correct Reply

134 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile

Avatar
Validate 25
MVP
Ratna_Kumar
MVP

Likes

158 likes

Total Posts

755 posts

Correct Reply

134 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile
Ratna_Kumar
MVP

21-09-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 ...

Creating Adobe Experience Manager 6.4 Sling Servlets that invoke MBean operations

Hope this helps!!

Thanks,

Ratna Kumar.