beautypg.com

HP Integrity NonStop J-Series User Manual

Page 85

background image

1.

Double-click the EmpInfo/WebContent/WEB-INF/web.xml file in the Project Explorer
frame to open it.

NOTE:

By default, XML files open in the XML Editor. The XML Editor has two views: Design

and Source view. Select the Source view.

2.

Open the EmpInfo/WebContent/WEB-INF/web.xml file.

The template for the default web.xml file generated during project creation is:


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">

EmpInfo


index.html
index.htm
index.jsp
default.html
default.htm
default.jsp

3.

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

4.

Set the class for the DispatcherServlet of the EmpInfo application in the web.xml file
as shown below:


EmpInfo

org.springframework.web.servlet.DispatcherServlet

1

5.

Specify the URL pattern as *.htm in the tag as shown below:


EmpInfo
*.htm

NOTE:

This servlet definition maps to the application patterns. Any URL with the .htm

extension is routed to the EmpInfo servlet (the DispatcherServlet).

After modification, the web.xml file appears as:


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">

EmpInfo


index.jsp


EmpInfo

Overview of EmpInfo

85

This manual is related to the following products: