tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: Getting the Tomcat shutdown port
Date Mon, 28 Feb 2011 17:06:44 GMT
On 28/02/2011 16:59, Olivier Lefevre wrote:
>> Your application may be on a shared Tomcat instance someday
>> and System.exit is really bad in that case.
> True. So let's kill the servlet instead.

If you want to stop a single Servlet then Servlet.init() is the place to
it. See section 2.3.2 of the Servlet 3.0 spec.

>> If you really do want to control Tomcat startup, a LifecycleListener
>> is a better approach but Tomcat specific.
> There are plenty of LifecycleListener classes in the API; which
> one would work best: ServerLifecycleListener?

org.apache.catalina.LifecycleListener was what I meant


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message