org.apache.myfaces.webapp
Class StartupServletContextListener
java.lang.Object
org.apache.myfaces.webapp.StartupServletContextListener
- All Implemented Interfaces:
- EventListener, javax.servlet.http.HttpSessionAttributeListener, javax.servlet.http.HttpSessionListener, javax.servlet.ServletContextAttributeListener, javax.servlet.ServletContextListener, javax.servlet.ServletRequestAttributeListener, javax.servlet.ServletRequestListener
public class StartupServletContextListener
- extends Object
- implements javax.servlet.ServletContextListener, javax.servlet.http.HttpSessionAttributeListener, javax.servlet.http.HttpSessionListener, javax.servlet.ServletRequestListener, javax.servlet.ServletRequestAttributeListener, javax.servlet.ServletContextAttributeListener
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.
This listener also delegates all session, request and context events to ManagedBeanDestroyer.
Because of that we only need to register one listener in the tld.
- Version:
- $Revision: 1304305 $ $Date: 2012-03-23 12:17:45 +0000 (Fri, 23 Mar 2012) $
- Author:
- Manfred Geiler (latest modification by $Author: werpu $)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StartupServletContextListener
public StartupServletContextListener()
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
setFacesInitializer
public void setFacesInitializer(FacesInitializer facesInitializer)
- configure the faces initializer
- Parameters:
facesInitializer
-
attributeAdded
public void attributeAdded(javax.servlet.http.HttpSessionBindingEvent event)
- Specified by:
attributeAdded
in interface javax.servlet.http.HttpSessionAttributeListener
attributeRemoved
public void attributeRemoved(javax.servlet.http.HttpSessionBindingEvent event)
- Specified by:
attributeRemoved
in interface javax.servlet.http.HttpSessionAttributeListener
attributeReplaced
public void attributeReplaced(javax.servlet.http.HttpSessionBindingEvent event)
- Specified by:
attributeReplaced
in interface javax.servlet.http.HttpSessionAttributeListener
sessionCreated
public void sessionCreated(javax.servlet.http.HttpSessionEvent event)
- Specified by:
sessionCreated
in interface javax.servlet.http.HttpSessionListener
sessionDestroyed
public void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
- Specified by:
sessionDestroyed
in interface javax.servlet.http.HttpSessionListener
attributeAdded
public void attributeAdded(javax.servlet.ServletContextAttributeEvent event)
- Specified by:
attributeAdded
in interface javax.servlet.ServletContextAttributeListener
attributeRemoved
public void attributeRemoved(javax.servlet.ServletContextAttributeEvent event)
- Specified by:
attributeRemoved
in interface javax.servlet.ServletContextAttributeListener
attributeReplaced
public void attributeReplaced(javax.servlet.ServletContextAttributeEvent event)
- Specified by:
attributeReplaced
in interface javax.servlet.ServletContextAttributeListener
attributeAdded
public void attributeAdded(javax.servlet.ServletRequestAttributeEvent event)
- Specified by:
attributeAdded
in interface javax.servlet.ServletRequestAttributeListener
attributeRemoved
public void attributeRemoved(javax.servlet.ServletRequestAttributeEvent event)
- Specified by:
attributeRemoved
in interface javax.servlet.ServletRequestAttributeListener
attributeReplaced
public void attributeReplaced(javax.servlet.ServletRequestAttributeEvent event)
- Specified by:
attributeReplaced
in interface javax.servlet.ServletRequestAttributeListener
requestInitialized
public void requestInitialized(javax.servlet.ServletRequestEvent event)
- Specified by:
requestInitialized
in interface javax.servlet.ServletRequestListener
requestDestroyed
public void requestDestroyed(javax.servlet.ServletRequestEvent event)
- Specified by:
requestDestroyed
in interface javax.servlet.ServletRequestListener
Copyright © 2015 The Apache Software Foundation. All rights reserved.