Environment properties

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, open the Web Application Properties dialog box.

NoteThe Environment tab configuration is the same for Web applications, application clients, and EJB components.

StepsAdding an environment property

  1. Display the Environment tab.

  2. Click Add. EAServer Manager creates a new entry with default settings. Edit the settings as described below:

StepsEditing an environment property

  1. If necessary, display the Environment tab. A list of environment properties appears.

  2. Edit the fields for the property of interest: