org.springframework.web.context
Class ContextLoaderListener

java.lang.Object
  extended by org.springframework.web.context.ContextLoader
      extended by org.springframework.web.context.ContextLoaderListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

public class ContextLoaderListener
extends ContextLoader
implements javax.servlet.ServletContextListener

Bootstrap listener to start up Spring's root WebApplicationContext. Simply delegates to ContextLoader.

This listener should be registered after Log4jConfigListener in web.xml, if the latter is used.

Since:
17.02.2003
Author:
Juergen Hoeller
See Also:
Log4jConfigListener

Field Summary
 
Fields inherited from class org.springframework.web.context.ContextLoader
CONFIG_LOCATION_PARAM, CONTEXT_CLASS_PARAM, LOCATOR_FACTORY_KEY_PARAM, LOCATOR_FACTORY_SELECTOR_PARAM
 
Constructor Summary
ContextLoaderListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
          Close the root web application context.
 void contextInitialized(javax.servlet.ServletContextEvent event)
          Initialize the root web application context.
protected  ContextLoader createContextLoader()
          Deprecated. in favor of simply subclassing ContextLoaderListener itself (which extends ContextLoader, as of Spring 3.0)
 ContextLoader getContextLoader()
          Deprecated. in favor of simply subclassing ContextLoaderListener itself (which extends ContextLoader, as of Spring 3.0)
 
Methods inherited from class org.springframework.web.context.ContextLoader
closeWebApplicationContext, createWebApplicationContext, customizeContext, determineContextClass, getCurrentWebApplicationContext, initWebApplicationContext, loadParentContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextLoaderListener

public ContextLoaderListener()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event)
Initialize the root web application context.

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

createContextLoader

@Deprecated
protected ContextLoader createContextLoader()
Deprecated. in favor of simply subclassing ContextLoaderListener itself (which extends ContextLoader, as of Spring 3.0)

Create the ContextLoader to use. Can be overridden in subclasses.

Returns:
the new ContextLoader

getContextLoader

@Deprecated
public ContextLoader getContextLoader()
Deprecated. in favor of simply subclassing ContextLoaderListener itself (which extends ContextLoader, as of Spring 3.0)

Return the ContextLoader used by this listener.

Returns:
the current ContextLoader

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent event)
Close the root web application context.

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener