![]() |
JNDI env Sample Application |
JNDI env Sample Application
This document describes how to use the JNDI env sample application in conjunction with Sun ONE Web Server.This sample application document contains the following sections:
Overview
- Compiling and Assembling the Application
- Deploying the Sample Application
- Running the Sample Application
Overview
The JNDI env sample application demonstrates use of the environment entry specified in the web.xml file.
Compiling and Assembling the Application
To compile and assemble the sample application:
- Go to <install_root>/plugins/java/samples/webapps/jndi/readenv/src and execute the ant command.
- Deploy the application.
- After you have created the sample application from scratch, you can proceed to Deploying the Sample Application. Step 3 is optional.
- To clean the web application project area (optional), execute the following command:
Deploying the Sample Application
To deploy the sample application, perform the following steps: If you want to verify registration of the application, proceed to Verifying Deployment. Otherwise, proceed to Running the Sample Application.
- <install_root>/plugins/java/samples/webapps/jndi/readenv/src
- Execute the following command:
You will see the jndi-readenv module displayed as one of the listed components.
- ant list_apps
Running the Sample
Application
http://<Web_Server_hostname>:<port>/jndi-readenv/JndiServlet