1

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.

Archan Mishra
  • 887
  • 7
  • 18

1 Answers1

1

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

palacsint
  • 28,416
  • 10
  • 82
  • 109