| JNDI Custom Resource Sample Application |
JNDI Custom Resource Sample Application
This document describes how to use the Java Naming and Directory Interface (JNDI) custom resource sample application with Sun Java System Web Server.This document contains the following sections:
- Overview
- Compiling and Assembling the Application
- Deploying the Sample Application
- Running the Sample Application
- Undeploying the Sample Application
Overview
The JNDI custom resource sample demonstrates the use of this custom resource.
Compiling and Assembling the Application
To compile and assemble the sample application, complete the following steps:
Compile and assemble the WAR file by changing to the source directory at install_root/samples/java/webapps/jndi/custom/src and running the ant command.
Note - Make sure that the necessary parameters for running the samples are specified in install_root/samples/java/webapps/common.properties.
The default target default is executed to build the WAR file.
- Execute the following command:
# ant create_custom
To run this command successfully, Administration Server must be running, and necessary parameters such as config.name, vs.name,
passwordfile.path etc. in install_root/samples/java/webapps/common.properties file must be specified correctly. (See 1. above)
- 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.
Deploying the Sample Application
To deploy the 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/jndi/custom/src.
- Run the ant tool using the deploy task.
# ant deploy
To verify the registration and deployment of the application, complete the following steps:
http://Sun_Java_System_Web_Server_hostname:port/jndi-customresource/customresource.jsp
"Hello" displays.
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/jndi/custom/src.
Run the ant tool using the undeploy task.
- Run the ant tool using the delete_resource task.
# ant delete_resource
This removes the deployed resource.
Copyright © 2007 Sun Microsystems, Inc. All rights reserved.