Name

ServletContextListener

Synopsis

Classes that implement this interface can be configured within a web application to receive notifications of servlet context lifecycle events (creation and destruction). Since the contextInitialized() method will be allowed to complete before the web application begins to process client requests, ServletContextListener objects can be used to create application level objects, such as configuration managers or connection pools, for use by the servlets in the application.

                  Passed To
public interface ServletContextListener extends java.util.EventListener {
// Public Instance Methods
   public abstract void contextDestroyed(
        ServletContextEvent sce);  
   public abstract void contextInitialized(
        ServletContextEvent sce);  
}

Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.