![]() |
JSTL Web Sample Application |
JSTL Web Sample Application
This document describes how to utilize the Java Standard Tag Library (JSTL) Web sample application in conjunction with Sun Java (tm) System Application Server 7.This sample application document contains the following sections:
Overview
Compiling and Assembling the Application
Deploying the Sample Application
Overview
The JSTL Web sample application demostrates how to use JSTL on the Sun Java (tm) System application server. The examples are ported from Jakarta's JSP(tm) Standard Tag Library implementation (1.0).To better understand sample application source code, you may refer to the related javadocs which can be accessed at sjsas_install_dir/samples/webapps/jstl/javadocs/index.html after it is generated.
Compiling and Assembling the Application
This section contains instructions to compile and assemble the JSTL Web sample application.
Go to sjsas_install_dir/samples/webapps/jstl/src/
Deploy the application.
- Execute the command asant
Note You must add sjsas_install_dir/bin to your path.
- The default target core will be executed to build the WAR file.
Clean the web application project area (optional).
- After you have re-created the sample application from scratch, you may proceed to Deploying the Sample Application. Step 3 is optional.
- Execute the command asant clean to clean the web application.
Deploying the Sample Application
In this section, you will learn how to deploy the JSTL Web sample application.Deploying the pre-built webapps-jstl.war file is simple. you may deploy by either Using the asant script or by Using the asadmin command.
Go to the src directory of the sample. For example:
Run asant using deploy task. For example:
- sjsas_install_dir/samples/webapps/jstl/src
- %asant deploy
Go to sjsas_install_dir/samples/webapps/jstl/
The deployment process involves the following operations:
- asadmin deploy -u <user-name> -w <password> -H <hostname> -p <admin server port> --instance <instance name> --type web webapps-jstl.war
Authenticates against the local application server's administrative server
If you would like to verify the registration of the application, you may proceed to Verifying Deployment. Otherwise, proceed to Running the Sample Application.The WAR file is transferred to the administrative server
The administrative server begins the registration process:
Verifying Deployment
As an optional step, you can use the Sun Java (tm) System Application Server Administration Tool 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:
Execute the command asadmin to look at applications deployed with a server instance. For example:
asadmin list-components -u <username> -w <password> -H <host> -p <admin-port> --type web <server instance name>
You will see the webapps-jstl module displayed as one of the listed components.
Undeploy the application
If you wish to undeploy the application after successful deployment, you may do so by either Using the asant script or by Using the asadmin command.
Go to sjsas_install_dir/samples/webapps/jstl/src
- asadmin undeploy -u <user-name> -w <password> -H <hostname> -p <admin server port> --instance <instance name> --type web webapps-jstl
Running the Sample Application
You may run the appliction through the following URL:http://<AppServer hostname>:<port>/webapps-jstl/index.html
If you encounter problems when running the application, review the log files at sjsas_install_dir/domains/<domain-instance> /<server-instance>/logs/server.log to learn what exactly went wrong.
Some Known IssuesIf the browser hangs after you click Import -> Absolute(FTP), it may be because the remote ftp server (ftp.gnu.org) is not ready.
- The sample can not be deployed from the application server administration GUI, if Precompile JSPs option is selected. Solution is, try deploying the application without Precompile JSPs, or deploy using asant.
- The sample can not be deployed using asadmin with option --precompilejsp=true. Solution is, try deploying the application without the option --precompilejsp=true, or deploy using asant.
Copyright © 2002 Sun Microsystems, Inc. All rights reserved.
Last Updated July 18, 2002