JSTL: JSP Standard Tag Library Kick Start By Jeff Heaton
Table of Contents
Chapter 7. Accessing Data with SQL Tags
Data access is an important feature of any Web application. Most Web applications are driven by SQL-compatible databases. JSTL provides a complete set of tags that allows access to SQL databases.
You may be wondering why such tags are needed. Most multitier Web applications are designed to keep database access out of JSP pages completely. This allows JSP pages to concentrate on the presentation interface while a collection of Enterprise JavaBeans (EJB) handles the backend database access. The JSTL SQL tags are meant to give you a way to incorporate SQL access into smaller projects or prototypes that do not need the complexity introduced by a multitier system.
We begin by examining how to create a Web application using only JSTL tags. Chapter 11, "Creating Your Own Tag Libraries," will follow up by showing you how to move this functionality into your own programs.
This chapter will present a complete Web application that was written entirely in JSTL. The primary examples for the next several chapters in this book will build on this Web application. By the end of Chapter 12, you will have developed a multilingual JSTL database application that does all backend processing through a custom tag library. This is the model that Sun is promoting with JSP 1.3.