Sun ONE logo
JSTL Web Sample Application

 

JSTL Web Sample Application
 

This document describes how to use the Java Standard Tag Library (JSTL) Web sample application in conjunction with Sun ONE Web Server.

This sample application document contains the following sections:

Overview

The JSTL web sample application demostrates how to use JSTL on the Sun ONE Web Server. The examples are ported from Jakarta's JSP(tm) Standard Tag Library implementation (1.0).
 

Compiling and Assembling the Application



This section contains instructions for compiling and assembling the JSTL web sample application.
  1. Go to <install_root>/plugins/java/samples/webapps/jstl/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, 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.

      NOTE:

         If you are using a proxy server, you will need to set the following system properties in server.xml.

         Open the server.xml of the web server instance.
         Add the following JVMOPTIONS
         
    For example
    , check the following sample JAVA element (/ws61 is the <install_root>, abc.xyz.com is the proxyHost, and 8080 is proxyPort):
       Change it from this
    <JAVA javahome="/ws61/bin/https/jdk" serverclasspath="/ws61/bin/https/jar/webserv-rt.jar: ${java.home}/lib/tools.jar:/ws61/bin/https/jar/webserv-ext.jar:/ws61/bin/https/jar/webserv-jstl.jar: /ws61/bin/https/jar/ktsearch.jar" classpathsuffix="" envclasspathignored="on" debug="false" debugoptions="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n" dynamicreloadinterval="2"> ........ ........ </JAVA> to this: <JAVA javahome="/ws61/bin/https/jdk" serverclasspath="/ws61/bin/https/jar/webserv-rt.jar: ${java.home}/lib/tools.jar:/ws61/bin/https/jar/webserv-ext.jar:/ws61/bin/https/jar/webserv-jstl.jar: /ws61/bin/https/jar/ktsearch.jar" classpathsuffix="" envclasspathignored="on" debug="false" debugoptions="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n" dynamicreloadinterval="2"> ........ <JVMOPTIONS>-Dhttp.proxyHost=abc.xyz.com</JVMOPTIONS> <JVMOPTIONS>-Dhttp.proxyPort=8080</JVMOPTIONS> <JVMOPTIONS>-Dftp.proxyHost=abc.xyz.com/JVMOPTIONS> <JVMOPTIONS>-Dftp.proxyPort=8080</JVMOPTIONS> ........ </JAVA> Save the server.xml and restart the server.
Deploying the Sample Application

To deploy the JSTL web sample application, perform the following steps:
  1. Go to the src directory of the sample:
    <install_root>/plugins/java/samples/webapps/jstl/src
     
  2. Run ant 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

As an optional step, you can use the Sun ONE Web Server Deploy Tool to verify that the application has been registered. Otherwise, proceed directly to Running the Sample Application.

  • Go to the src directory of the sample:
    <install_root>/plugins/java/samples/webapps/jstl/src
  • Run ant using the deploy task. For example:
    ant list_apps
    You will see the webapps-jstl module displayed as one of the listed components.
     

    Undeploying the Application

    1. Go to <install_root>/plugins/java/samples/webapps/jstl/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-jstl
     



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