com.mycompany.lifecycle
Class ServletContextLifecycleNotifier

java.lang.Object
  extended by 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


Constructor Summary
ServletContextLifecycleNotifier()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent sce)
           
 void contextInitialized(javax.servlet.ServletContextEvent sce)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletContextLifecycleNotifier

public ServletContextLifecycleNotifier()
Method Detail

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