I am trying to impl开发者_如何学Goement a alerting system in my web app which mails me when the tomcat is shutting down. I can do it by parsing the server logs.
But i want the app to mail me.
ServletContextListener.contextDestroyed. It is called when the Tomcat is shutting down or when the application is undeployed.
Here is an example: http://www.java-tips.org/java-ee-tips/java-servlet/how-to-work-with-servletcontextlistener.html
精彩评论