Unlike other web scripting languages such as ColdFusion, Server Side JavaScript, and PHP, JSP does not define its own set of tags for database access. Rather than develop yet another mechanism for database access, the designers of JSP chose to leverage Java’s powerful, popular, database API—JDBC.
When a JSP application needs to communicate with a database, it does so through a vendor-provided driver class written to the JDBC API. Accessing a database in JSP then is nothing new; it sticks to this tried and true workhorse from Sun.
The JDBC classes are part of the java.sql package, which must be imported into any Java class from which you wish to access JDBC, including
your JSP pages. Additional, optional extensions for the 2.0 version of the JDBC API can be found in the javax.sql package, if it is installed on your
system. If your JDBC driver is not in your JSP container’s class path, you will have to either import it into your page or refer to it through its fully
qualified class name.