public class

ContextLoaderListener

extends ContextLoader
implements ServletContextListener
java.lang.Object
   ↳ org.springframework.web.context.ContextLoader
     ↳ org.springframework.web.context.ContextLoaderListener

Class Overview

Bootstrap listener to start up and shut down Spring's root WebApplicationContext. Simply delegates to ContextLoader as well as to ContextCleanupListener.

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

Summary

[Expand]
Inherited Constants
From class org.springframework.web.context.ContextLoader
Public Constructors
ContextLoaderListener()
Public Methods
void contextDestroyed(ServletContextEvent event)
Close the root web application context.
void contextInitialized(ServletContextEvent event)
Initialize the root web application context.
ContextLoader getContextLoader()
This method is deprecated. in favor of simply subclassing ContextLoaderListener itself (which extends ContextLoader, as of Spring 3.0)
Protected Methods
ContextLoader createContextLoader()
This method is deprecated. in favor of simply subclassing ContextLoaderListener itself (which extends ContextLoader, as of Spring 3.0)
[Expand]
Inherited Methods
From class org.springframework.web.context.ContextLoader
From class java.lang.Object
From interface javax.servlet.ServletContextListener

Public Constructors

public ContextLoaderListener ()

Public Methods

public void contextDestroyed (ServletContextEvent event)

Close the root web application context.

public void contextInitialized (ServletContextEvent event)

Initialize the root web application context.

public ContextLoader getContextLoader ()

This method is 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

Protected Methods

protected ContextLoader createContextLoader ()

This method is 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