This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes How to handle undeploy event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to handle undeploy event" Watch "How to handle undeploy event" New topic
Author

How to handle undeploy event

Veera Sundar
Greenhorn

Joined: Jun 08, 2007
Posts: 25
Hi All,

Is there any way to call a function, when my web application is undeployed from Tomcat?


Thanks,<br />Veera |<a href="http://veerasundar.com/blog" target="_blank" rel="nofollow">Blog</a>
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
If the web app is running at the time you can work with Servlet.destroy for servlets, and more generally with ServletContext.contextDestroyed.

If the web app is not running, then there is no code to call...


Ping & DNS - updated with new look and Ping home screen widget
Veera Sundar
Greenhorn

Joined: Jun 08, 2007
Posts: 25
Thanks for the information Ulf... Very useful.
 
Don't get me started about those stupid light bulbs.
 
subject: How to handle undeploy event
 
Similar Threads
jsr 88: How to get an instance of DeployableObject
Tomcat undeployment
How to make AXIS start a class each time it starts?
How to reload an application.
error due to the following reason(s): Web mapping already exists