org.apache.tiles.web.startup
Class TilesListener

java.lang.Object
  extended by org.apache.tiles.web.startup.TilesListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

public class TilesListener
extends java.lang.Object
implements javax.servlet.ServletContextListener

Listener for the initialization of the Tiles container.

Version:
$Rev: 609762 $ $Date: 2008-01-07 20:53:08 +0100 (Mon, 07 Jan 2008) $

Field Summary
protected static org.apache.commons.logging.Log LOG
          Log instance.
 
Constructor Summary
TilesListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
          Remove the tiles container from service.
 void contextInitialized(javax.servlet.ServletContextEvent event)
          Initialize the TilesContainer and place it into service.
protected  TilesContainer createContainer(javax.servlet.ServletContext context)
          Creates a Tiles container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG
Log instance.

Constructor Detail

TilesListener

public TilesListener()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event)
Initialize the TilesContainer and place it into service.

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
Parameters:
event - The intercepted event.

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent event)
Remove the tiles container from service.

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
Parameters:
event - The intercepted event.

createContainer

protected TilesContainer createContainer(javax.servlet.ServletContext context)
                                  throws TilesException
Creates a Tiles container.

Parameters:
context - The servlet context to use.
Returns:
The created container
Throws:
TilesException - If something goes wrong during creation.