JNDI Resources HOW-TO
Table of Contents
Introduction
Tomcat provides a JNDI InitialContext implementation
instance for each web application running under it, in a manner that is
compatible with those provided by a
Java Enterprise Edition application server. The Java EE standard provides
a standard set of elements in the /WEB-INF/web.xml file to
reference/define resources.
See the following Specifications for more information about programming APIs for JNDI, and for the features supported by Java Enterprise Edition (Java EE) servers, which Tomcat emulates for the services that it provides:
- Java Naming and Directory Interface (included in JDK 1.4 onwards)
- Java EE Platform Specification (in particular, see Chapter 5 on Naming)
web.xml configuration
The following elements may be used in the web application deployment
descriptor (/WEB-INF/web.xml) of your web application to define
resources:
<env-entry>- Environment entry, a single-value parameter that can be used to configure how the application will operate.<resource-ref>- Resource reference, which is typically to an object factory for resour
