Modifying the web.xml file – HP Integrity NonStop J-Series User Manual
Page 284
Modifying the web.xml File
Modify the web.xml file to set the Faces servlet and its mapping.
To modify the web.xml file, complete the following steps:
1.
Configure WebApplicationContext to use the Spring ContextLoaderServlet. To do
so, add the following code in the web.xml file:
org.springframework.web.servlet.DispatcherServlet
2.
Set the class for the Faces Controller servlet of the EmpInfo application by adding the following
code in the web.xml file.
This ensures that the web.xml file has a Faces servlet entry
(javax.faces.webapp.FacesServlet), which serves as a Faces Controller servlet.
NOTE:
The Faces Controller servlet intercepts all Faces requests.
3.
Specify the URL pattern as *.jsf in the <servlet-mapping/> tag as shown below:
NOTE:
This servlet mapping definition is for mapping the URL patterns. It ensures that any
URL with the .jsf extension is routed to the Faces Servlet (the Faces Controller servlet).
4.
Set the extension filter by adding the following code:
org.apache.myfaces.component.html.util.ExtensionsFilter
5.
Set the filter mapping as shown below:
284 Integrating Frameworks