Package org.apache.myfaces.webapp
Class MyFacesContainerInitializer
- java.lang.Object
- 
- org.apache.myfaces.webapp.MyFacesContainerInitializer
 
- 
- All Implemented Interfaces:
- jakarta.servlet.ServletContainerInitializer
 
 public class MyFacesContainerInitializer extends Object implements jakarta.servlet.ServletContainerInitializer This class is called by any Java EE 6 complaint container at startup. It checks if the current webapp is a Faces-webapp by checking if some of the Faces related annotations are specified in the webapp classpath or if the faces-config.xml file is present. If so, the listener checks if the FacesServlet has already been defined in web.xml and if not, it adds the FacesServlet with the mappings (/faces/*, *.jsf, *.faces) dynamically.- Version:
- $Revision$ $Date$
- Author:
- Jakob Korherr (latest modification by $Author$)
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringFACES_SERVLET_ADDED_ATTRIBUTEIf the servlet mapping for the FacesServlet is added dynamically, Boolean.TRUE is stored under this key in the ServletContext.static StringFACES_SERVLET_FOUNDIf the servlet mapping for the FacesServlet is found on the ServletContext, Boolean.TRUE is stored under this key in the ServletContext.static StringFACES_SERVLET_SERVLETREGISTRATIONStore the FacesServlet ServletRegistration using this key in the ServletContext.
 - 
Constructor SummaryConstructors Constructor Description MyFacesContainerInitializer()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonStartup(Set<Class<?>> clazzes, jakarta.servlet.ServletContext servletContext)
 
- 
- 
- 
Field Detail- 
FACES_SERVLET_ADDED_ATTRIBUTEpublic static final String FACES_SERVLET_ADDED_ATTRIBUTE If the servlet mapping for the FacesServlet is added dynamically, Boolean.TRUE is stored under this key in the ServletContext.- See Also:
- Constant Field Values
 
 - 
FACES_SERVLET_FOUNDpublic static final String FACES_SERVLET_FOUND If the servlet mapping for the FacesServlet is found on the ServletContext, Boolean.TRUE is stored under this key in the ServletContext.- See Also:
- Constant Field Values
 
 - 
FACES_SERVLET_SERVLETREGISTRATIONpublic static final String FACES_SERVLET_SERVLETREGISTRATION Store the FacesServlet ServletRegistration using this key in the ServletContext. The is necessary for the Faces 4.0 Extensionless Mapping feature. This is used in FacesInitializerImpl when configuring the Extensionless Mapping feature since an UnsupportedOperationException is thrown when calling the ServletContext.getServletRegistrations method if the StartupServletContextListener was added programmatically.- See Also:
- Constant Field Values
 
 
- 
 
-