I am trying to implement 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.
I am trying to implement 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