beautypg.com

Modifying the web.xml file – HP Integrity NonStop J-Series User Manual

Page 284

background image

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:


context

org.springframework.web.servlet.DispatcherServlet

1

2.

Set the class for the Faces Controller servlet of the EmpInfo application by adding the following
code in the web.xml file.


Faces Servlet
javax.faces.webapp.FacesServlet

1

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:


Faces Servlet
*.jsf

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:


extensionsFilter

org.apache.myfaces.component.html.util.ExtensionsFilter


uploadMaxFileSize
100m


uploadThresholdSize
100k

5.

Set the filter mapping as shown below:


extensionsFilter
*.jsf


extensionsFilter
/faces/*

284 Integrating Frameworks

This manual is related to the following products: