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:
Enter the Start Qshell (STRQSH) command on an OS/400 command line.
To create your sample application directory, enter this command on the Qshell command line:
mkdir /hcsampleTo locate the existing sample application source files, enter this command:
cd /QIBM/UserData/WebAS5/Base/default/installedApps/nodename/DefaultApplication.earwhere nodename is the host name of the iSeries server.
Copy the HitCount sample application source JAR file to the directory that you created. Enter this command:
cp Increment_src.jar /hcsampleCopy the HitCount servlet source JAR file to the directory that you created. Enter this command:
cp DefaultWebApplication_src.jar /hcsampleOn the Qshell command line, enter this command:
cd DefaultWebApplication.warCopy the HitCount JSP source file. On the Qshell command line, enter this command:
cp HitCount.jsp /hcsampleOn the Qshell command line, enter this command:
cd /hcsampleThe 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.jarjar xvf DefaultWebApplication_src.jar