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 Summary
FieldsModifier and TypeFieldDescriptionstatic final String
If the servlet mapping for the FacesServlet is added dynamically, Boolean.TRUE is stored under this key in the ServletContext.static final String
If the servlet mapping for the FacesServlet is found on the ServletContext, Boolean.TRUE is stored under this key in the ServletContext.static final String
Store the FacesServlet ServletRegistration using this key in the ServletContext. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
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:
-
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:
-
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:
-
-
Constructor Details
-
MyFacesContainerInitializer
public MyFacesContainerInitializer()
-
-
Method Details