Java Reference
In-Depth Information
Although SQL JSTL tags allow us to quickly create web applications that interact
with a database, they tend to create applications that are hard to maintain, since they
mix database access with display logic. For this reason, these tags are suitable for
prototyping and for " throwaway" applications.
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.
 
Search WWH ::




Custom Search