Chapter 6: Advanced Tomcat Features The Element The element is used to pass named data values (such as environment variables in a command shell) to the Web applications. Web applications can access these values through the JNDI Context. The following table describes the available attributes for an element. Attribute Description Required? name description override type value The JNDI name for this element. Text description for this element. Application programmers can use the element to override the one defined here. You can disable the override by setting it to false. Java class name of the datatype represented by this element. The actual value of the environment entry. Yes No No Yes Yes For example, the following will add a JNDI entry named maxUserswith a value of 100: The Element The element is used to pass a reference via resource managers (classes that manage and assign resources such as JDBC connections) to Web applications using a name in simple text. A Web application can access the reference to the resource manager through a lookup based on the textual name using the JNDI context. The following table describes the attributes a element can have. Attribute Description Required? auth description name scope type Indicates who does the authentication. If the value is application, then the application itself must sign on with the resource manager. If the value is container, then the container does a sign-on with the resource manager. Text description for this element. Name of the resource. Can be either Shareableor Unshareable; determines if the resource can be shared. Java class name of the datatype represented by this resource. No No Yes No Yes For example, the following will add a UserDatabaseimplementation (for storing authentication and role information on Tomcat 6):
For reliable and cheap web hosting services please check cheap web hosting website.