Java Reference
In-Depth Information
In order to successfully use the SQL JSTL tags, we need to create a connection pool
and data source in the application server we are using to deploy our application.
NetBeans comes pre-configured with a sample database, and the integrated
GlassFish application server included with NetBeans comes with a datasource to
access this sample database out of the box. In this section we will be using the sample
database and its corresponding datasource. In Chapter 5 we will explain how to
configure NetBeans and GlassFish to interact with a relational database that hasn't
been pre-configured.
Before we can interact with a relational database through the JSTL SQL tags, we
need to configure our application to have access to the data source providing access
to the appropriate relational database. We can accomplish this by adding a resource
reference in our application's web.xml deployment descriptor.
Since web.xml is optional in Java EE 6, NetBeans does not generate it by
default. To add a web.xml deployment descriptor to our project, we simply
need to right-click on the project node, select New | Other , then select Standard
Deployment Descriptor (web.xml) file type from the Web category.
After clicking Next> , we can click on OK on the following window to generate the
deployment descriptor.
 
Search WWH ::




Custom Search