Sun Java System Web Server 6.1 SP12 Programmer's Guide to Web Applications

Reference Elements

Reference elements are as follows:

resource-env-ref

Maps the res-ref-name in the corresponding J2SE web.xml file resource-env-refentry to the absolute jndi-name of a resource.

Subelements

The following table describes subelements for the resource-env-ref element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 6–22 resource-env-ref Subelements

Element  

Required  

Description  

resource-env-ref-name

only one 

Specifies the res-ref-name in the corresponding J2SE web.xml file resource-env-ref entry.

jndi-name

only one 

Specifies the absolute jndi-name of a resource.

Attributes

none

resource-env-ref-name

Contains data that specifies the res-ref-name in the corresponding J2SE web.xml file resource-env-ref entry.

Subelements

none

Attributes

none

resource-ref

Maps the res-ref-namee in the corresponding J2SE web.xml file resource-ref entry to the absolute jndi-name of a resource.

Subelements

The following table describes subelements for the resource-ref element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 6–23 resource-ref Subelements

Element  

Required  

Description  

res-ref-name

only one 

Specifies the res-ref-name in the corresponding J2SE web.xml file resource-ref entry.

jndi-name

only one 

Specifies the absolute jndi-name of a resource.

default-resource-principal

zero or one 

Specifies the default principal (user) for the resource. 

Attributes

none

res-ref-name

Contains data that specifies the res-ref-name in the corresponding J2SE web.xml file resource-ref entry.

Subelements

none

Attributes

none

default-resource-principal

Specifies the default principal (user) for the resource.

If this element is used in conjunction with a JMS Connection Factory resource, the name and password subelements must be valid entries in Sun™ Java System Message Queue's broker user repository.

Subelements

The following table describes subelements for the default-resource-principal element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.

Table 6–24 default-resource-principal Subelements

Element  

Required  

Description  

name

only one 

Contains the name of the principal. 

password

only one 

Contains the password for the principal. 

Attributes

none

name

Contains data that specifies the name of the principal.

Subelements

none

Attributes

none

password

Contains data that specifies the password for the principal.

Subelements

none

Attributes

none

jndi-name

Contains data that specifies the absolute jndi-name of a URL resource or a resource in the server.xml file.


Note –

To avoid collisions with names of other enterprise resources in JNDI, and to avoid portability problems, all names in a Sun Java System Web Server application should begin with the string java:comp/env.


Subelements

none

Attributes

none