Setting up the HTMLSampleBP application in WebSphere Studio Application Developer
5.1.1 Integration Edition running on Windows(R)
The following procedure describes how to install the HTMLSampleBP
Application in WebSphere(R) Studio
Application Developer 5.1.1 Integration Edition and run the sample in
one of the Test Environment configurations.
The following procedure
applies whether you are running WebSphere Studio Application Developer
5.1.1 Integration Edition on windows.
To set up the application
in WebSphere Studio
Application Developer 5.1.1 Integration Edition:
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 c:\temp.
Copy createCHATables.ddl to directory c:\temp.
Shift to c:\temp directory and open DB2 Command Window.
In DB2 Command
Window, run DB2 CONNECT TO SAMPLE USER DB2ADMIN USING DB2ADMIN
In DB2 Command
Window, run db2 -tvf createCHATables.ddl
You will see messages
indicating that CHAChildren , CHAInstance and CHAControl tables have been
created successfully.
Import BTTHTMLSampleBPEAR.ear
Start WebSphere Studio Application Developer
5.1.1 Integration Edition. From the menu bar, open J2EE perspective. Select File > Import > EAR file and click Next.
In the Import wizard, set the following parameters:
Save the file. Right-click BTTHTMLSampleWeb and select Rebuild
Project.
Set up server in WebSphere Studio Application Developer
5.1 test environment.
Open Server Perspective.
Click New > Server
and Server Configuration and set the following parameters:
Server name: HTMLSampleServer
Folder: Servers
Server Type: Integration Test Environment
Click Finish.
Define JAAS Authentication entries in server configuration.
In the Server Configuration panel, double-click the server instance HTMLSampleServer.
Select the Security tab. In the Cell Settings section,
click Add button to add a JAAS Authentication Entry
and set the following parameters:
Alias: CHA
User ID: db2admin
Password: db2admin
Description: HTMLSample
Click Add button to add a JAAS Authentication
Entry and set the following parameters:
Alias: sna
User ID: sna
Password: sna
Description: HTMLSample
Click OK.
Select Data source tab. In the Server
Settings section, Click Add button to add an IBM(R) DB2 JDBC Provider
(XA) to the JDBC Provider list.
In the window that pops up , select IBM
DB2 in the DataBase type section and DB2 JDBC Provider
(XA) in the JDBC Provider type section, Click Next.
In the window that pops up, input name DB2
JDBC Provider (XA) and Click Finish.
Also in Data source tab and the Server Settings section
, select DB2 JDBC Provider (XA) in JDBC Provider list
and then click Add button to create a Data Source.
In the window that pops up , select DB2 JDBC Provider (XA) in
the type of JDBC Provider section and select Version 5.0 data source in
the data source type section . Click Next.
In the pop-up Modify Data Source window,
set the following parameters:
Name: CHADataSource
JNDI name: jdbc/CHADataSource
Description: CHA Exercise
Statement cache size: 10
Data source helper class name: com.ibm.websphere.rsadapter.DB2DataStoreHelper
Connection timeout: 1800
Maximum connections: 10
Minimum connections: 1
Reap time: 180
Unused timeout: 1800
Aged timeout: 0
Purge policy: EntirePool
Component-managed authentication alias: CHA
Container-managed authentication alias: CHA
Check the checkbox: use this data source in container
managed persistence (CMP)
Select the J2C tab. In the J2C
Resource Adapters section, click Add button
to add an Resource Adapter to the Resource Adapter list.
In the Create Resource Adapter window
that pops up, click OK.
In the Resource Adapter list,
select dummysnalu0Connector. In the J2C
Connection Factories section, click Add button.
In the Create Connection Factory window
that pops up, set the following parameters:
Name: snalu0
JNDI name: snalu0
Description: snaDataSource
Component-managed authentication alias: sna
Container-managed authentication alias: sna
Others use default value
Click OK.
In the Resource Properties section,
set the following parameters:
From J2EE perspective, right-click BTTCHAEJB. Select Generate > Deploy and RMIC Code.
In the window that pops up, check all check-boxes
and Click Finish.
From J2EE perspective, right-click BTTFormaterEJB, select Generate > Deploy and RMIC Code.
In the window that pops up, check all check-boxes
and Click Finish.
From J2EE perspective, right-click BTTHTMLSampleBPEJB, select Generate > Deploy and RMIC Code.
In the window that pops up, check all check-boxes
and Click Finish.
From J2EE perspective, right-click bttsvcinfra, select Generate > Deploy and RMIC Code.
In the window that pops up, check all check-boxes
and Click Finish.
From J2EE perspective, right-click BTTHTMLSampleEJB, select Generate > Deploy and RMIC Code.
In the window that pops up, check all check-boxes
and Click Finish.
Associate the BTTHTMLSample project with the server configuration.
In the Servers view, right-click and select Add and Remove Projects.
Add BTTHTMLSampleBPEAR, Click Finish.
Start HTMLSampleServer. In the HTMLSampleServer view, right-click
and select Start.
Run HTMLSample. Open Web Browser and input URL: http://serverName:9080/BTTHTMLSampleWeb/btt/html/sign/prepareSignIn.do