org.apache.myfaces.webapp
Class StartupServletContextListener

java.lang.Object
  extended by org.apache.myfaces.webapp.StartupServletContextListener
All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener

public class StartupServletContextListener
extends Object
implements javax.servlet.ServletContextListener

Initialise the MyFaces system.

This context listener is registered by the JSP TLD file for the standard JSF "f" components. Normally, servlet containers will automatically load and process .tld files at startup time, and therefore register and run this class automatically.

Some very old servlet containers do not do this correctly, so in those cases this listener may be registered manually in web.xml. Registering it twice (ie in both .tld and web.xml) will result in a harmless warning message being generated. Very old versions of MyFaces Core do not register the listener in the .tld file, so those also need a manual entry in web.xml. However all versions since at least 1.1.2 have this entry in the tld.

Version:
$Revision: 952074 $ $Date: 2010-06-06 22:14:18 -0500 (Sun, 06 Jun 2010) $
Author:
Manfred Geiler (latest modification by $Author: lu4242 $)

Constructor Summary
StartupServletContextListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent e)
           
 void contextInitialized(javax.servlet.ServletContextEvent event)
           
static void initFaces(javax.servlet.ServletContext servletContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StartupServletContextListener

public StartupServletContextListener()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event)
Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

initFaces

public static void initFaces(javax.servlet.ServletContext servletContext)

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent e)
Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.