beautypg.com

Creating the empinfo-servlet.xml file – HP Integrity NonStop J-Series User Manual

Page 48

background image


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

org.springframework.web.servlet.DispatcherServlet

1


EmpInfo
*.htm

Creating the EmpInfo-servlet.xml File

Create a WebApplicationContext file, which contains references to all the web-related
components. The name of this file is determined by the value of the element
in the web.xml file, with -servlet appended to it (hence, EmpInfo-servlet.xml). This is
the standard naming convention used with the Spring Web MVC framework.

The EmpInfo-servlet.xml file contains the bean definitions (plain Java objects) used by the
DispatcherServlet

.

To create the EmpInfo-servlet.xml file in the EmpInfo/WebContent/WEB-INF directory:
1.

In the Project Explorer frame, right-click EmpInfo and select New > Other.

The New File Wizard dialog box appears.

48

Spring Framework

This manual is related to the following products: