Environment properties allow you to specify global read-only data for use by servlets and JSPs in the Web application.
Servlets and JSPs must use JNDI to retrieve environment properties,
using the prefix java:comp/env
in
JNDI lookups. Unlike context initialization properties, environment
properties can have datatypes other than java.lang.String.
The deployment descriptor catalogs the environment properties used by your servlets and JSPs, as well as each property’s Java datatype and default value. Deployers can tailor the values to match a server’s configuration. For example, you may have environment properties to specify the name of a logging file, or to tune cache usage.
To add or configure an environment property, follow the procedures described in “Resource references”.
For the selected property, add or modify:
Entry The environment property’s JNDI name, relative to the java:comp/env prefix.
Type Choose the Java datatype that matches the property value.
Value The initial or post-deployment value of the property, specified as text in a format that is valid for the specified datatype.
Description An optional comment that explains how the property is used.