Description of configuration in Web. XML in JNDI

Source: Internet
Author: User

define the properties of a resource in/WEB-INF/Web. xml. When you use JNDI to find the and elements, these features are returned. You must also define resource parameters for the same resource name. These parameters are used to configure the attributes of the object factory and the object factory.
for example, Web. xml:

<Resource-ref> <description> employees database for HR applications </description> <res-ref-Name> JDBC/employeedb </RES-ref-Name> <res-ref- type> javax. SQL. datasource </RES-ref-type> <res-auth> container </RES-auth> </resource-ref> <resource-env-ref -Name> JMS/stockqueue </resource-env-ref-Name> <resource-env-type> javax. JMS. queue </resource-env-ref-type> </resource-env-ref>

The valid attributes of the <resource-ref>/<resource-env-ref> element are as follows:

Attribute Description

Web ApplicationCodeThe user signs on to the corresponding resource mananger, or the container represents the web application sign on to the resource manager. The value of this attribute must be application or container. If <resource-ref> is used in the Web application deployment descriptor, this attribute is required. If <resource-env-ref> is used, this attribute is optional.


Resource text description (optional)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.