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.
The Environment tab configuration is the same for Web applications, application clients, and EJB components.
Adding an environment property
Display the Environment tab.
Click Add. EAServer Manager creates a new entry with default settings. Edit the settings as described below:
Editing an environment property
If necessary, display the Environment tab. A list of environment properties appears.
Edit the fields for the property of interest:
Entry The environment property’s JNDI name, relative to the java:comp/env prefix.
Type Choose the Java datatype that matches the property value from the dropdown list.
Value The initial or post-deployment value of the property, specified as text in a format that is valid for the specified datatype.
Description Optionally enter a comment to explain how the property is used.
Copyright © 2005. Sybase Inc. All rights reserved. |