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
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.
Constructor and Description |
---|
StartupServletContextListener() |
Modifier and Type | Method and Description |
---|---|
void |
attributeAdded(javax.servlet.http.HttpSessionBindingEvent event) |
void |
attributeAdded(javax.servlet.ServletContextAttributeEvent event) |
void |
attributeAdded(javax.servlet.ServletRequestAttributeEvent event) |
void |
attributeRemoved(javax.servlet.http.HttpSessionBindingEvent event) |
void |
attributeRemoved(javax.servlet.ServletContextAttributeEvent event) |
void |
attributeRemoved(javax.servlet.ServletRequestAttributeEvent event) |
void |
attributeReplaced(javax.servlet.http.HttpSessionBindingEvent event) |
void |
attributeReplaced(javax.servlet.ServletContextAttributeEvent event) |
void |
attributeReplaced(javax.servlet.ServletRequestAttributeEvent event) |
void |
contextDestroyed(javax.servlet.ServletContextEvent event) |
void |
contextInitialized(javax.servlet.ServletContextEvent event) |
void |
requestDestroyed(javax.servlet.ServletRequestEvent event) |
void |
requestInitialized(javax.servlet.ServletRequestEvent event) |
void |
sessionCreated(javax.servlet.http.HttpSessionEvent event) |
void |
sessionDestroyed(javax.servlet.http.HttpSessionEvent event) |
void |
setFacesInitializer(FacesInitializer facesInitializer)
configure the faces initializer
|
public void contextInitialized(javax.servlet.ServletContextEvent event)
contextInitialized
in interface javax.servlet.ServletContextListener
public void contextDestroyed(javax.servlet.ServletContextEvent event)
contextDestroyed
in interface javax.servlet.ServletContextListener
public void setFacesInitializer(FacesInitializer facesInitializer)
facesInitializer
- public void attributeAdded(javax.servlet.http.HttpSessionBindingEvent event)
attributeAdded
in interface javax.servlet.http.HttpSessionAttributeListener
public void attributeRemoved(javax.servlet.http.HttpSessionBindingEvent event)
attributeRemoved
in interface javax.servlet.http.HttpSessionAttributeListener
public void attributeReplaced(javax.servlet.http.HttpSessionBindingEvent event)
attributeReplaced
in interface javax.servlet.http.HttpSessionAttributeListener
public void sessionCreated(javax.servlet.http.HttpSessionEvent event)
sessionCreated
in interface javax.servlet.http.HttpSessionListener
public void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
sessionDestroyed
in interface javax.servlet.http.HttpSessionListener
public void attributeAdded(javax.servlet.ServletContextAttributeEvent event)
attributeAdded
in interface javax.servlet.ServletContextAttributeListener
public void attributeRemoved(javax.servlet.ServletContextAttributeEvent event)
attributeRemoved
in interface javax.servlet.ServletContextAttributeListener
public void attributeReplaced(javax.servlet.ServletContextAttributeEvent event)
attributeReplaced
in interface javax.servlet.ServletContextAttributeListener
public void attributeAdded(javax.servlet.ServletRequestAttributeEvent event)
attributeAdded
in interface javax.servlet.ServletRequestAttributeListener
public void attributeRemoved(javax.servlet.ServletRequestAttributeEvent event)
attributeRemoved
in interface javax.servlet.ServletRequestAttributeListener
public void attributeReplaced(javax.servlet.ServletRequestAttributeEvent event)
attributeReplaced
in interface javax.servlet.ServletRequestAttributeListener
public void requestInitialized(javax.servlet.ServletRequestEvent event)
requestInitialized
in interface javax.servlet.ServletRequestListener
public void requestDestroyed(javax.servlet.ServletRequestEvent event)
requestDestroyed
in interface javax.servlet.ServletRequestListener
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.