Creating the applicationcontext.xml file, Creating the jdbc.properties file – HP Integrity NonStop J-Series User Manual
Page 66
![background image](/manuals/397993/66/background.png)
6.
“Adding Dependency JAR Files” (page 71)
7.
“Creating Database Catalog, Schema, and Tables on NonStop” (page 71)
Creating the applicationContext.xml File
1.
Create the applicationContext.xml file in the EmpInfo/WebContent/WEB-INF/
directory, as described in
“Creating the EmpInfo-servlet.xml File” (page 48)
2.
Create a new XML file in the EmpInfo/WebContent/WEB-INF directory and type the name
of the XML file as applicationContext.
3.
Modify the applicationContext.xml file to add a bean definition of the EmployeeDao
class. After modification, the applicationContext.xml file must appear as:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
${jdbc.catalog}
${jdbc.schema}
Creating the jdbc.properties File
The JdbcDaoSupport feature of Spring framework is used for connecting to the NonStop SQL/MX
database and for carrying out requested database transactions. To fulfill this requirement, the
jdbc.properties
file must be created to include all the database related information.
1.
In the Project Explorer frame, right-click EmpInfo and select New > File.
The New File dialog box appears.
2.
In the File name field, type jdbc.properties and ensure that the parent folder is set to the
EmpInfo/WebContent/WEB-INF
directory. Click Finish.
66
Spring Framework