org.apache.myfaces.webapp
Class StartupServletContextListener

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

public class StartupServletContextListener
extends AbstractMyFacesListener
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: 1067544 $ $Date: 2011-02-05 17:33:47 -0500 (Sat, 05 Feb 2011) $
Author:
Manfred Geiler (latest modification by $Author: lu4242 $)

Constructor Summary
StartupServletContextListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
           
 void contextInitialized(javax.servlet.ServletContextEvent event)
           
protected  FacesInitializer getFacesInitializer()
           
 void setFacesInitializer(FacesInitializer facesInitializer)
          configure the faces initializer
 
Methods inherited from class org.apache.myfaces.webapp.AbstractMyFacesListener
doPreDestroy, doPreDestroy, doPreDestroy, doPreDestroy
 
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

contextDestroyed

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

getFacesInitializer

protected FacesInitializer getFacesInitializer()

setFacesInitializer

public void setFacesInitializer(FacesInitializer facesInitializer)
configure the faces initializer

Parameters:
facesInitializer -


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