Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.web.context
Class ContextLoaderListener

    java.lang.Object
      org.springframework.web.context.ContextLoaderListener

All Implemented Interfaces:
  EventListener, ServletContextListener

    public class ContextLoaderListener

extends Object
implements 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:
  `ContextLoaderServlet`, `Log4jConfigListener`

Constructor Summary
`ContextLoaderListener()`

Method Summary
`void` | `contextDestroyed(ServletContextEvent event)` Close the root web application context.
`void` | `contextInitialized(ServletContextEvent event)` Initialize the root web application context.
`protected ContextLoader` | `createContextLoader()` Create the ContextLoader to use.
`ContextLoader` | `getContextLoader()` Return the ContextLoader used by this listener.

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(ServletContextEvent event)

  Initialize the root web application context.

  Specified by:
    `contextInitialized` in interface `ServletContextListener`

### createContextLoader

    protected ContextLoader createContextLoader()

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

  Returns:
    the new ContextLoader

### getContextLoader

    public ContextLoader getContextLoader()

  Return the ContextLoader used by this listener.

  Returns:
    the current ContextLoader

### contextDestroyed

    public void contextDestroyed(ServletContextEvent event)

  Close the root web application context.

  Specified by:
    `contextDestroyed` in interface `ServletContextListener`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2008 The Spring Framework.