Assemble the application: Prepare the HitCount sample application

 

One of the benefits of WAS is that it does not matter where the source code files for the application are developed. You can assemble the application on any workstation supported by the product, and then deploy the application to an application server installed on any of the supported WAS platforms. This scenario demonstrates how to package an application you have written. The scenario does not describe how to write the application itself.

Follow these steps to find the source code files for the HitCount sample application and copy them into a new directory:

  1. Enter the Start Qshell (STRQSH) command on an OS/400 command line.

  2. To create your sample application directory, enter this command on the Qshell command line:

    mkdir /hcsample

  3. To locate the existing sample application source files, enter this command:

    cd /QIBM/UserData/WebAS5/Base/default/installedApps/nodename/DefaultApplication.ear

    where nodename is the host name of the iSeries server.

  4. Copy the HitCount sample application source JAR file to the directory that you created. Enter this command:

    cp Increment_src.jar  /hcsample

  5. Copy the HitCount servlet source JAR file to the directory that you created. Enter this command:

    cp DefaultWebApplication_src.jar /hcsample

  6. On the Qshell command line, enter this command:

    cd  DefaultWebApplication.war

  7. Copy the HitCount JSP source file. On the Qshell command line, enter this command:

    cp HitCount.jsp /hcsample

  8. On the Qshell command line, enter this command:

    cd /hcsample

  9. The HitCount sample application source files are packaged in JAR files. To use the source files for compilation and deployment in the basic configuration scenario, unpackage the HitCount sample application JAR files. On the Qshell command line, enter these commands:

    jar xvf Increment_src.jar
    jar xvf DefaultWebApplication_src.jar

Continue Next: Compile the enterprise bean files