Java Reference
In-Depth Information
We can add this resource reference by opening our application's
web.xml
deployment descriptor (located under the
Configuration Files
folder), clicking on
the
References
button in the tool bar, then expanding the
Resource References
node,
and clicking on the
Add...
button.
For our purposes, all we need to do is add a value for the
Resource Name
text field.
The value of this field must be the
Java Naming and Directory Interface
(
JNDI
)
name of the data source we wish to use with our application. In our specific example,
this JNDI name is
jdbc/sample
.
After entering the resource name for our datasource and clicking
OK
, we can see it
listed in the
Resource References
section of our application's
web.xml
.