Adding dependency jar files to the project library – HP Integrity NonStop J-Series User Manual

Page 262

Advertising
background image

SkinSelector</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>

2.

Set the index.jsp file as the <welcome-file> by deleting other files from the
<welcome-file-list>

.

3.

Set the class for the Faces Controller servlet of the SkinSelector application by adding the
following information in the <webapps> tag:

<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

4.

Specify the URL pattern as *.faces in the <servlet-mapping/> tag as shown below:

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>

NOTE:

This servlet definition maps to the URL patterns. Any URL with the .faces extension

will be routed to the Faces (Controller servlet).

After modification, the web.xml file appears as:

<?xml version="1.0"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>
javax.faces.webapp.FacesServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

Adding Dependency JAR Files to the Project Library

Apart from the core MyFaces runtime JAR files, SkinSelector requires some dependency JAR files.
Download the following distributions of the dependency JAR files on your Windows system:

262 Getting Started with MyFaces

Advertising
This manual is related to the following products: