JSTL Web Sample Application

 JSTL Web Sample Application
 

This document describes how to use the JavaServer Pages Standard Tag Library (JSTL) sample application with Sun Java System Web Server.

This document contains the following sections:

Overview

The JSTL web sample application shows how to use JSTL on the Sun Java System Web Server. The examples are ported from the Jakarta Project's JSP Standard Tag Library Implementation.


Compiling and Assembling the Application



To compile and assemble the sample application, complete the following steps:
  1. Compile and assemble the WAR file by changing to the source directory at install_root/samples/java/webapps/jstl/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.

  2. Deploy the application.
    After you have re-created the sample application from scratch, proceed to Deploying the Sample Application.
     
  3. (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.


Note - If you are using a proxy server, you must add the following values to jvm.options property within install_root/samples/java/webapps/jstl/src/jstl.build.properties. file.
    
For example, if the proxy host is abc.xyz.com and 8080 is the proxy port, then set the value as follows.

jvm.options=-Dhttp.proxyHost=abc.xyz.com -Dhttp.proxyPort=8080 -Dftp.proxyHost=abc.xyz.com -Dftp.proxyPort=8080

Then execute:

# ant set_jvm_options

This adds the following elements to server.xml:

<jvm-options>-Dhttp.proxyHost=abc.xyz.com</jvm-options>
<jvm-options>-Dhttp.proxyPort=8080</jvm-options>
<jvm-options>-Dftp.proxyHost=abc.xyz.com</jvm-options>
<jvm-options>-Dftp.proxyPort=8080</jvm-options>


Deploying the Sample Application



To deploy the JSTL web sample application, complete the following steps:
  1. Change to the source directory at install_root/samples/java/webapps/jstl/src.
     
  2. Run the ant tool using the deploy task.

    # ant deploy
If you want to verify registration of the application, proceed to Verifying Deployment. Otherwise, proceed to Running the Sample Application.
 

Verifying Deployment

To verify the registration and deployment of the application, complete the following steps:

  1. Change to the source directory at install_root/samples/java/webapps/jstl/src.
  2. Run the ant tool using the list_apps task.

    # ant list_apps

    The webapps-jstl module is listed as one of the components.

Running the Sample Application

You can run the application through the following URL:

http://Sun_Java_System_Web_Server_hostname:port/webapps-jstl
 

Undeploying the 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:

  1. Change to the source directory at install_root/samples/java/webapps/caching/src.

  2. Run the ant tool using the undeploy task.

    # ant undeploy


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