aspose file tools
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 Meteor in Action this week in the JavaScript 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
Rancher

Joined: Mar 22, 2005
Posts: 42955
    
  73
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...
Veera Sundar
Greenhorn

Joined: Jun 08, 2007
Posts: 25
Thanks for the information Ulf... Very useful.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to handle undeploy event