Java Reference
In-Depth Information
+- /faces-config.xml (optional)
+- /*.taglib.xml (optional)
+- /glassfish-web.xml
The web.xml file (or web deployment descriptor), the set of JAR files, and the set of
application files must be contained in the WEB-INF directory of the WAR file.
Configuring an Application with a Web Deployment Descriptor
Web applications are commonly configured using elements contained in the web applica-
tion deployment descriptor, web.xml . The deployment descriptor for a JavaServer Faces
application must specify certain configurations, including the following:
• The servlet used to process JavaServer Faces requests
• The servlet mapping for the processing servlet
• The path to the configuration resource file, if it exists and is not located in a default
location
The deployment descriptor can also include other, optional configurations, such as:
• Specifying where component state is saved
• Encrypting state saved on the client
• Compressing state saved on the client
• Restricting access to pages containing JavaServer Faces tags
• Turning on XML validation
• Specifying the Project Stage
• Verifying custom objects
This section gives more details on these configurations. Where appropriate, it also de-
scribes how you can make these configurations using NetBeans IDE.
Identifying the Servlet for Lifecycle Processing
A requirement of a JavaServer Faces application is that all requests to the application
that reference previously saved JavaServer Faces components must go through
javax.faces.webapp.FacesServlet . A FacesServlet instance manages the
request processing lifecycle for web applications and initializes the resources required by
JavaServer Faces technology.
Before a JavaServer Faces application can launch its first web page, the web container
must invoke the FacesServlet instance in order for the application lifecycle process
Search WWH ::




Custom Search