Chapter 6: Advanced Tomcat Features The Element The

Chapter 6: Advanced Tomcat Features The Element The element associates parameters with the resource manager already configured in a element. This element is often used to configure the resource manager. For example, if the is a JDBC DataSource, the may contain the Relational Database Management Server (RDBMS) server location, login name, and password to use. The element can contain the attribute shown in the following table. Attribute Description Required? name Name of corresponding resource Yes Each element can contain one or more / subelements, expressed as follows:
password wrox123
The Element The element refers to a previously configured JNDI resource (typically in the subelement associated with a server), making these resources available to all , , and components. This enables resources to be defined and shared across servers or globally. A element can have the attributes described in the following table. Attribute Description Required? global name type The name of the resource being linked to The name of the resource, accessible by Web application via JNDI lookup The Java programming language class name indicating the type of resource returned Yes Yes Yes For example, if the UserDatabase element is already defined in the server s subelement (see the element example earlier), then it can be referred to within a element of a Web application using the following: This entry will link the previously defined UserDatabaseinstance (named myDatabasein ) to the JNDI addressable resource called localDatabase. The Web application can perform a JNDI lookup for localDatabaseand obtain access to the UserDatabase instance.

For high quality java hosting services please check java web hosting website.

Comments are closed.