| Simple Web Sample Application |
This document describes how to use the simple web sample application with Sun Java System Web Server.
This sample application document contains the following sections:
- Overview
- Compiling and Assembling the Application
- Deploying the Sample Application
- Running the Sample Application
- Undeploying the Sample Application
- Troubleshooting
Overview
The simple web sample application is a collection of simple servlets and JSPs that demonstrate use of the Servlet and JSP specifications.
Compiling and Assembling the Application
To compile and assemble the sample application, complete the following steps:Deploying the Sample Application
- Compile and assemble the WAR file by changing to the source directory at install_root/samples/java/webapps/simple/src and running the ant command.
- The default target default is executed to build the WAR file.
Note - Make sure that the necessary parameters for running the samples are specified in install_root/samples/java/webapps/common.properties.
- Deploy the application.
- After you have re-created the sample application from scratch, you can proceed to Deploying the Sample Application.
- (Optional.) Clean the web application project area.
- # ant clean
This removes the assemble and build directories for the sample application. The WAR file is now ready for deployment.
To deploy the simple web sample application, complete the following steps:If you want to verify the registration of the application, proceed to Verifying Deployment. Otherwise, proceed to Running the Sample Application.
- Change to the source directory at install_root/samples/java/webapps/simple/src
- Run the ant tool using the deploy task.
As an optional step, you can verify that the application has been registered. Otherwise, proceed directly to Running the Sample Application.
To verify the registration and deployment of the application, complete the following steps:
Running the Sample Application
- Change to the source directory at install_root/samples/java/webapps/simple/src.
- Run the ant tool using the list_apps task.
# ant list_apps
The webapps-simple module is listed as one of the components.
You can run the application through the following URL:http://Sun_Java_System_Web_Server_hostname:port/webapps-simple
Navigate through the JSP and servlet links to execute each simple web sample application.
Undeploying the Sample Application
After successfully deploying and running the application, you might decide to undeploy it and remove the files. To undeploy the application, complete the following steps:
- Change to the source directory at install_root/samples/java/webapps/simple/src.
- Run the ant tool using the undeploy task.
Troubleshooting
If you encounter problems when running the application, review the log files at install_root/instance/logs/errors to determine what went wrong.
Copyright © 2007 Sun Microsystems, Inc. All rights reserved.