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

<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>EmpInfo</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
</web-app>
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 <servlet-name/> 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,
complete the following steps:
1.
On the Project Explorer frame, right-click EmpInfo and select New > Other.
The New File Wizard dialog box appears.
2.
From the list of folders, select XML > XML and click Next.
Figure 17 New File Wizard Dialog Box
86
Getting Started with Spring