tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Getting the Tomcat shutdown port
Date Mon, 28 Feb 2011 17:09:37 GMT
> From: Olivier Lefevre [mailto:lefevrol@yahoo.com] 
> Subject: Re: Getting the Tomcat shutdown port

> > Your application may be on a shared Tomcat instance someday
> > and System.exit is really bad in that case.

> So let's kill the servlet instead.

The servlet, or the webapp?

> But it's still unclear how you'd do that because from the 
> ServletConfig you can get the ServletContext but from the
> ServletContext you can no longer get the Servlet:

There's no "the Servlet"; the ServletContext is for the webapp, which may be comprised of
many servlets.

Why don't you simply throw a ServletException in the init() method of the servlets of interest?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message