java.lang.Object
com.sun.faces.config.FacesInitializer
- All Implemented Interfaces:
ServletContainerInitializer
Initializes Jakarta Faces if at least one of the following conditions is met:
- The
Setof classes passed to this initializer contains an user-defined Faces type, or FacesServlethas been explicitly mapped ,or/WEB-INF/faces-config.xmlexists
FacesServlet has not been explicitly mapped,
then add mappings *.xhtml, /faces, *.jsf, and *.faces for the FacesServlet.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAnnotatedClasses(Set<Class<?>> classes, ServletContext servletContext) voidonStartup(Set<Class<?>> classes, ServletContext servletContext) Notifies this ServletContainerInitializer of the startup of the application represented by the given ServletContext.
-
Field Details
-
FACES_PACKAGE_PREFIX
- See Also:
-
MOJARRA_PACKAGE_PREFIX
- See Also:
-
MOJARRA_TEST_PACKAGE_PREFIX
- See Also:
-
-
Constructor Details
-
FacesInitializer
public FacesInitializer()
-
-
Method Details
-
onStartup
Description copied from interface:ServletContainerInitializerNotifies this ServletContainerInitializer of the startup of the application represented by the given ServletContext.If this ServletContainerInitializer is bundled in a JAR file inside the WEB-INF/lib directory of an application, its onStartup method will be invoked only once during the startup of the bundling application. If this ServletContainerInitializer is bundled inside a JAR file outside of any WEB-INF/lib directory, but still discoverable as described above, its onStartup method will be invoked every time an application is started.
- Specified by:
onStartupin interfaceServletContainerInitializer- Parameters:
classes- the Set of application classes that extend, implement, or have been annotated with the class types specified by theHandlesTypesannotation, or null if there are no matches, or this ServletContainerInitializer has not been annotated with HandlesTypesservletContext- the ServletContext of the web application that is being started and in which the classes contained in c were found- Throws:
ServletException- if an error has occurred
-
addAnnotatedClasses
-