beautypg.com

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

Page 47

background image

Welcome to the EmpInfo Application


This is EmpInfo Test Page.

The code of the EmpInfo application developed so far is located in <My SASH
Home
>\spring\getting-started\EmpInfo-InParts\Part-1

.

At this point, you can either deploy and verify the EmpInfo application you have developed so far
on the NonStop system, or you can proceed with the steps for modifying the web.xml file.

For deployment, see the steps described in

“Deploying EmpInfo on NonStop” (page 87)

.

You can verify the EmpInfo application by accessing the following URL:

http://:/<servlet directory>/EmpInfo

.

Modifying the web.xml File

To modify the web.xml file, set the dispatcher servlet and its mapping as follows:
1.

Open the EmpInfo/WebContent/WEB-INF/web.xml file by double-clicking it in the Project
Explorer frame.

NOTE:

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

and Source view. Select the Source view.

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

2.

Except index.jsp, delete the other files from .

3.

Set the class for the DispatcherServlet as shown:


EmpInfo

org.springframework.web.servlet.DispatcherServlet

1

4.

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

Getting Started with Spring

47

This manual is related to the following products: