com.mycompany.lifecycle
Class ServletContextLifecycleNotifier
java.lang.Object
com.mycompany.lifecycle.ServletContextLifecycleNotifier
- All Implemented Interfaces:
- java.util.EventListener, javax.servlet.ServletContextListener
@WebListener
public class ServletContextLifecycleNotifier
- extends java.lang.Object
- implements javax.servlet.ServletContextListener
Thanks to Dan Allen for this useful code: https://gist.github.com/637959
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletContextLifecycleNotifier
public ServletContextLifecycleNotifier()
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce)
- Specified by:
contextInitialized
in interface javax.servlet.ServletContextListener
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyed
in interface javax.servlet.ServletContextListener