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
Set
of classes passed to this initializer contains an user-defined Faces type, or FacesServlet
has been explicitly mapped ,or/WEB-INF/faces-config.xml
exists
FacesServlet
has not been explicitly mapped,
then add mappings *.xhtml, /faces, *.jsf, and *.faces for the FacesServlet.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAnnotatedClasses
(Set<Class<?>> classes, ServletContext servletContext) void
onStartup
(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:ServletContainerInitializer
Notifies 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:
onStartup
in interfaceServletContainerInitializer
- Parameters:
classes
- the Set of application classes that extend, implement, or have been annotated with the class types specified by theHandlesTypes
annotation, 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
-