Setting up the HTMLSample application on WebSphere Application Server 5.1.1
running Windows, Linux and Unix Platform
The following procedure describes how to install the HTMLSample Application
on WebSphere(R) Application
Server and run the sample in one of the Test Environment configurations.
The
following procedure applies if your WebSphere Application Server are running Windows(R), Linux(R) and
Unix Platform
To set up the application on WebSphere Application Server:
Copy external files
Extract the BTTHTMLSampleWeb.war file from
BTTHTMLSample.ear, then extract the \dse directory from the BTTHTMLSampleWeb.war.
On your OS system, create a directory /dse.
Copy all the files in the \dse directory you extracted from
BTTHTMLSampleWeb.war to the \dse directory you created in step 1.a.
Create database and tables.
Run DB2(R) CREATE DATABASE SAMPLE in DB2 command
window to create a database named sample. You can set user
and password for database SAMPLE. For example, set both user and password
as db2inst1.
Create three tables:
Create a directory called /temps.
Copy createCHATables.ddl to directory /temps.
Shift to /temps directory and open DB2 Command Window.
In DB2 Command
Window, run DB2 CONNECT TO SAMPLE USER DB2INST1 USING DB2INST1
In DB2 Command
Window, run db2 -tvf createCHATables.ddl
You will see messages
indicating that CHAChildren , CHAInstance and CHAControl tables have been
created successfully.
Open a Web Browser, input the following URL to open the Administrative
Console:
http://serveName:9090/admin
Import BTTHTMLSampler.ear into WAS
In the navigation bar, select Applications > Install new Application .
In the main frame, click Browse and locate
BTTHTMLSample.ear file. Click Next
In Step2 frame, specify the DataBase Type.
In Deploy EJBs Option - Database Type field, use the default
value. For DB2,
select DB1UDB_V81.
In Step4 frame, input jdbc/CHADataSource for JNDI Name. Use
default value for other settings
In setp10 frame, Click Finish.
Click Save to Master Configuration
Click Save to finish importing
BTTHTMLSample.ear.
Set up JDBC Providers
In the navigation bar, select Resource > JDBC Providers .
In the main frame, click New
In JDBC Providers field, select the JDBC Provider. It must be
the (XA) JDBC Provider. Click OK.
For other settings, use default value, click OK to
return to the JDBC Providers page.
Click the JDBC Provider Name.
In Additional Properties section, click Data Source .
Click New.
Use default value. Click OK to return
to Data Sources page.
Click Data Source Name.
In the Related Items section, click J2C Authentication
Data Entries.
11) Click New and do the following settings:
Alias: CHA
User ID: db2inst1
Password: db2inst1
Click OK to save the value.
In the navigation bar, select Resource > JDBC Providers > JDBC Provider Name > Data Source .
Click Data Source Name
Select value for Component-managed Authentication Alias and
Container-managed Authentication Alias fields. Click OK to
return to Data Sources page.
Click Data Source Name
In Additional Properties section , click Custom Properties.Set
the databaseName and serverName. Use the default value for other settings,
click save on the top of the page.
In the navigation bar, select Resource > JDBC Providers > JDBC Provider Name > Data Source select the Data Source and
click Test Connection. You will see some
messages indicating that Test Connection was successful.
Start the Applications
In the navigation bar, select Applications > Enterprise Applications .
Select BTTHTMLSampleEAR and click Start.
Open a Web Browser, input the following URL to run the BTTHTMLSample: