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

Page 68

Advertising
background image

3.

Modify the jdbc.properties file based on the JDBC driver type you use:

If you use the JDBC Type 2 driver, the SQL/MX settings for JDBC Type 2 driver in the
jdbc.properties

file must appear as:

#----------------------------------------------------------------------------
# SQL/MX Settings for JDBC Type 2 Driver

jdbc.url=jdbc:sqlmx://
jdbc.driver=com.tandem.sqlmx.SQLMXDriver
jdbc.user=
jdbc.password=
jdbc.catalog=empinfocat
jdbc.schema=empinfosch

NOTE:

Because JDBC Type 2 driver resides on the NonStop system, you need not type

the username and password in the jdbc.username and jdbc.password fields.

If you use the JDBC Type 4 driver, the SQL/MX settings for JDBC Type 4 driver in the
jdbc.properties

file must appear as:

#----------------------------------------------------------------------------
# SQL/MX Settings for JDBC Type 4 Driver

jdbc.driver=com.tandem.t4jdbc.SQLMXDriver
jdbc.url=jdbc:t4sqlmx://<HP NonStop System IP Address>:<Port No.>
jdbc.user=<HP NonStop Username>
jdbc.password=<HP NonStop Password>
jdbc.catalog=empinfocat
jdbc.schema=empinfosch

NOTE:

To use the JDBC Type 4 driver, type the JDBC URL (NonStop system IP Address and
Port Number of the JDBC data source), NonStop system username, and password.

The name of the database catalog used in the example is empinfocat and the
schema name is empinfosch. If these database catalog and schema names conflict
with any of the existing catalog and schema names on the NonStop system, modify
the database catalog and schema names in the jdbc.properties file.

Modifying the EmpInfo-servlet.xml File

Modify the EmpInfo-servlet.xml file in the EmpInfo/WebContent/WEB-INF directory to
define the new form and controller as shown below:

<bean name="/insert.htm" class="com.hp.empinfo.web.EmployeeController">
<property name="formView">
<value>insert</value>
</property>
<property name="commandClass">
<value>com.hp.empinfo.domain.Employee</value>
</property>
<property name="commandName">
<value>emp</value>
</property>
</bean>

After modification, the EmpInfo-servlet.xml file appears as:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

68

Spring Framework

Advertising
This manual is related to the following products: