
Chapter 3. Connecting to a Database with JSTL SQL Tag Library
JSP 1.1 and the later versions of JSP support reusable modules called custom actions. A custom action is invoked with a custom tag in a JSP page. A collection of custom tags is called a tag library. Various SQL tag libraries are available for accessing a database. The JavaServer Pages Standard Tag Library (JSTL) is a tag library, which provides SQL tags for accessing a database. JSTL 1.1 requires a JSP container that supports Servlet specification 2.4 and JSP specification 2.0. In this chapter, we will discuss the JSTL SQL tag library and develop a JSTL SQL tag library application in JDeveloper 10.1.3 with embedded OC4J, which supports Servlet 2.4 and JSP 2.0 specifications. The JSTL SQL tag library was created before JDBC 4.0 specification became available. If you are using the JDBC 4.0 driver with JDK 6.0, you would still be able to use the JSTL SQL tag library. We will be using JDBC 4.0 with JDK 6.0 for accessing the Oracle database using the JSTL SQL tag library. First, let us discuss the JSTL SQL tag library tags.