NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator's Guide

Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator’s Guide—596210-006
3-16
The Installation-Specific servlet.config File
Example 3-13 shows the default value of the USRCP variable.
SERVLET_BANK
The SERVLET_BANK variable is used to specify the name of the required database
table in the format <catalog>.<schema>.<tablename> used in example bank
application distributed with NSJSP. If the table does not exist, the bank application
uses this variable to create the table at run time. The SERVLET_BANK variable can
be deleted if the bank application is removed.
The bank application is installed by default. The application name is
bankapp.war. This application is located in <NSJSP_HOME>/webapps.
Example 3-13. The Default Value of the USRCP Variable
#
# Set the default value of the User ClassPath blank
#
set USRCP ""
Note. The bank application creates (if it does not already exist) the table specified by
the SERVLET_BANK environment variable. If NSJSP is started by a super group, the
application may attempt to create the table on the $SYSTEM volume. Normally the
$SYSTEM volume is not audited by Transaction Management Facility (TMF). In that
case, the table creation will fail and the sample bank application will not work.
The bank application does not create a new table if it already exists. To prevent an
attempt to create a table on $SYSTEM volume, HP recommends that you create the
table manually. For example, while creating a table in SQL/MX, you can use the
LOCATION clause to specify the volume on which the table is created.
A sample
SQL/MX script to create the required table for bank application is as shown
below:
create catalog bankcat;
set catalog bankcat;
create schema banksch;
set schema banksch;
create table bankcat.banksch.bankdata (
acctno smallint unsigned not null,
lastname char(20) not null,
firstname character(20) not null,
city character(20) not null,
balance int not null,
primary key(acctno)) location $DATA01;
The script to create the table for the sample bankapp application is <NSJSP_HOME>
/conf/bankapp_mx_ddl.sql. Before running the script, ensure that you replace
suitable values for catalog, schema, and tablename.