How to run a servlet when an application or Tomcat is stopped

2004-11-10 Thread Bill McHugh
I know that you can use load-on-startup to run a servlet when an application is started. Is there a way to specify that a particular servlet (or java class) is to be run when (a) the application is stopped, and (b) when Tomcat is shut down (or will shutting down Tomcat automatically trigger (a))?

Re: How to run a servlet when an application or Tomcat is stopped

2004-11-10 Thread Ben Souther
Yes, read up on ContextListeners. On Wed, 2004-11-10 at 15:15, Bill McHugh wrote: I know that you can use load-on-startup to run a servlet when an application is started. Is there a way to specify that a particular servlet (or java class) is to be run when (a) the application is stopped, and