Sun ONE logo
Simple Web Sample Application

 

Simple Web Sample Application
 

This document describes how to use the simple web sample application in conjunction with Sun ONE Web Server.

This sample application document contains the following sections:



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



This section contains instructions for building and assembling the simple web sample application.
  1. Go to <install_root>/plugins/java/samples/webapps/simple/src
    Execute the command ant
     
    The default target 'default' will be executed to build the WAR file.
     
  2. Deploy the application.
    After you have re-created the sample application from scratch, you can proceed to Deploying the Sample Application. Step 3 is optional.
     
  3. Clean the web application project area (optional).
    Execute the command ant clean to clean the web application.
     
Deploying the Sample Application

To deploy the simple web sample application, perform the following steps:
  1. Go to the src directory of the sample:
    <install_root>/plugins/java/samples/webapps/simple/src
     
  2. Run ant using the deploy task:
    ant deploy
If you want to verify the registration of the application, proceed to Verifying Deployment. Otherwise, proceed to Running the Sample Application.
 

Verifying Deployment

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 of the application, do the following:

    You will see webapp-simple listed.
     

Undeploying the Application

  1. Go to <install_root>/plugins/java/samples/webapps/simple/src.
  2. Execute the following:
    ant undeploy

Running the Sample Application



You can run the application through the following URL:

http://<Web_Server_hostname>:<port>/webapps-simple

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 <install_root>/<instance>/logs/errors  to determine what went wrong.
  

Copyright © 2003 Sun Microsystems, Inc. All rights reserved.