File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Spring in Action this week in the Spring 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: 42276
    
  64
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 - my free Android networking tools app
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