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:

  1. Copy external files
    1. Extract the BTTHTMLSampleWeb.war file from BTTHTMLSample.ear, then extract the \dse directory from the BTTHTMLSampleWeb.war.
    2. On your OS system, create a directory /dse.
    3. Copy all the files in the \dse directory you extracted from BTTHTMLSampleWeb.war to the \dse directory you created in step 1.a.
  2. Create database and tables.
    1. 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.
    2. Create three tables:
      1. Create a directory called /temps.
      2. Copy createCHATables.ddl to directory /temps.
      3. Shift to /temps directory and open DB2 Command Window.
      4. In DB2 Command Window, run DB2 CONNECT TO SAMPLE USER DB2INST1 USING DB2INST1
      5. In DB2 Command Window, run db2 -tvf createCHATables.ddl

        You will see messages indicating that CHAChildren , CHAInstance and CHAControl tables have been created successfully.

  3. Open a Web Browser, input the following URL to open the Administrative Console:

    http://serveName:9090/admin

  4. Import BTTHTMLSampler.ear into WAS
    1. In the navigation bar, select Applications > Install new Application .
    2. In the main frame, click Browse and locate BTTHTMLSample.ear file. Click Next
    3. In Step2 frame, specify the DataBase Type.
    4. In Deploy EJBs Option - Database Type field, use the default value. For DB2, select DB1UDB_V81.
    5. In Step4 frame, input jdbc/CHADataSource for JNDI Name. Use default value for other settings
    6. In setp10 frame, Click Finish.
    7. Click Save to Master Configuration
    8. Click Save to finish importing BTTHTMLSample.ear.
  5. Set up JDBC Providers
    1. In the navigation bar, select Resource > JDBC Providers .
    2. In the main frame, click New
    3. In JDBC Providers field, select the JDBC Provider. It must be the (XA) JDBC Provider. Click OK.
    4. For other settings, use default value, click OK to return to the JDBC Providers page.
    5. Click the JDBC Provider Name.
    6. In Additional Properties section, click Data Source .
    7. Click New.
    8. Use default value. Click OK to return to Data Sources page.
    9. Click Data Source Name.
    10. In the Related Items section, click J2C Authentication Data Entries.
    11. 11) Click New and do the following settings:
      • Alias: CHA
      • User ID: db2inst1
      • Password: db2inst1
    12. Click OK to save the value.
    13. In the navigation bar, select Resource > JDBC Providers > JDBC Provider Name > Data Source .
    14. Click Data Source Name
    15. Select value for Component-managed Authentication Alias and Container-managed Authentication Alias fields. Click OK to return to Data Sources page.
    16. Click Data Source Name
    17. 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.
    18. 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.
  6. Start the Applications
    1. In the navigation bar, select Applications > Enterprise Applications .
    2. Select BTTHTMLSampleEAR and click Start.
  7. Open a Web Browser, input the following URL to run the BTTHTMLSample:

    http://serverName:9080/BTTHTMLSampleWeb/btt/html/sign/prepareSignIn.do