Environment Entries |
You can configure named values that will be made visible to all
web applications as environment entry resources by nesting
<Environment> entries inside this element. For
example, you can create an environment entry like this:
| | | |
<GlobalNamingResources ...>
...
<Environment name="maxExemptions" value="10"
type="java.lang.Integer" override="false"/>
...
</GlobalNamingResources>
| | | | |
This is equivalent to the inclusion of the following element in the
web application deployment descriptor (/WEB-INF/web.xml ):
| | | |
<env-entry>
<env-entry-name>maxExemptions</param-name>
<env-entry-value>10</env-entry-value>
<env-entry-type>java.lang.Integer</env-entry-type>
</env-entry>
| | | | |
but does not require modification of the deployment descriptor
to customize this value.
The valid attributes for an <Environment> element
are as follows:
Attribute | Description |
---|
description |
Optional, human-readable description of this environment entry.
| name |
The name of the environment entry to be created, relative to the
java:comp/env context.
| override |
Set this to false if you do not want
an <env-entry> for the same environment entry name,
found in the web application deployment descriptor, to override the
value specified here. By default, overrides are allowed.
| type |
The fully qualified Java class name expected by the web application
for this environment entry. Must be one of the legal values for
<env-entry-type> in the web application deployment
descriptor: java.lang.Boolean ,
java.lang.Byte , java.lang.Character ,
java.lang.Double , java.lang.Float ,
java.lang.Integer , java.lang.Long ,
java.lang.Short , or java.lang.String .
| value |
The parameter value that will be presented to the application
when requested from the JNDI context. This value must be convertable
to the Java type defined by the type attribute.
|
|
|