Simple Web Sample Application

> Simple Web Sample Application
> This document describes how to utilize the Simple Web sample application in conjunction with Apache Tomcat 6.0.x Servlet/JSP container

> This sample application document contains the following sections:

> - Overview

> - Compiling and Assembling the Application

> - Deploying the Sample Application

> - Running the Sample Application

> - Troubleshooting

> Overview

> The Simple Web sample application is a collection of simple servlets and JSPs that demonstrate the usage of the Servlet and the JSP specification.

> The following instructions describe how to manually deploy the application. You may want to experiment by modifying and redeploying the sample.

> Compiling and Assembling the Application

> This section contains instructions to build and assemble the Simple Web sample application using a Command Line Interface (CLI).

> To rebuild the entire application from scratch, follow these steps:

> Compile and assemble the application. For example:

> Execute the command ant under <install_root>/j2ee_agents/am_tomcat_agent/sampleapp

> The default target will be executed to build the WAR files.

> Deploy the application.

> After you have re-created the sample application from scratch, you may proceed to Deploying the Sample Application.

> Deploying the Sample Application

> To deploy the application, do the following:

> Copy agentsample.war file to the <$CATALINE_HOME>/webapps folder and restart the Tomcat server instance.

> This will deploy the agentsample.war file located under <install_root>/j2ee_agents/am_tomcat_agent/sampleapp/dist.

> Verifying Deployment
> As an optional step, you can use the Tomcat Manager application to verify that the application has been registered. Otherwise, proceed directly to Running the Sample Application.

> To verify the registration of the application, do the following:

> Run the tomcat manager application to look at applications deployed with a server instance. For example:

> http://<host>:<port>/manager/html

> You will see agentsample listed.
> Running the Sample Application

> You can run the application through the following URL:

> http://<hostname>:<port>/agentsample

> Traverse the JSP and Servlet links to execute each simple web sample application.

> Troubleshooting

> If you encounter problems when running the application, review the log files at: <agent_install_root>/<agent_instance>/logs/debug directory to learn what exactly went wrong.