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

How set timeout for Servlet


Not applicable

I've developed a servlet to AEM.
The Servlet works correctly, but I wanted to better understand its life cycle.
Especially, once the servlet is invoked how to set a timeout for its execution, if it never ends its operations, and how to handle the release of its resources - all within the context of AEM.
I did some testing, and from what I see it seems that once the servlet is started you can't stop it
I tried to set the a t imeout by turning based configuration of this service "Jetty based Apache Felix HTTP Service"
(from the Configuration Manager) but without success

I had a look at this thread [] and seems that it's not possible to manage the life cycle of a servlet

Thanks for the help and support

2 Replies


Level 10

"but I wanted to better understand its life cycle"

Read about Sling  Servlets here:


Not applicable

Hi Scott,
thank you for your reply

I following your suggestion to read the documentation, in particular this paragraph: "servlet-lifecycle-issues"
And to me seems that once a servlet is instantiated, it's not possible to stop it.

Because the requirement I have, i thinking if there is a way to check the progress of the Servlet?
Or if could be a useful way try to instantiate threads for each request and manage their live-cycle?