Review: JSTL in Action · 395 words posted 12/17/2002 02:51 PM
The JavaServer Pages Standard Tag Library (JSTL) is a new, tag-based method of building dynamic web pages, and JSTL in Action by Shawn Bayern is a solid introduction.
JSTL makes it easy for non-programmers to connect to databases, format text, process conditional logic, and manipulate XML—in other words, most of the tasks you would expect an application server to handle. JSTL is so easy to learn that anyone who has developed applications with ColdFusion, JSP, ASP, or PHP will be able to read a JSTL page and understand its functions. JSTL tags require a JSP container such as Tomcat or JRun, and a web server such as Apache or IIS. I was able to write and test JSTL on a Windows XP laptop, running IIS and JRun 4. Mr. Bayern wisely leaves the details of installing and implementing JSTL and the necessary container to a companion website, and uses the book to focus on the basics of writing pages with JSTL tags.
The JSTL tags are divided into four core libraries, listed here with their tag prefixes: Core© for outputting text and flow control; XML (x) for working with XML; Database (sql) for manipulating databases; and Formatting (fmt) for formatting and internationalization. Mr. Bayern introduces each library with a basic sample, and progressively builds to more sophisticated examples. By the end of the book, Mr. Bayern shows you how to build a message board, an online survey, and a web portal using JSTL.
It’s a bit puzzling that Mr. Bayern advises the user to install hsqldb, an open-source database written in Java, for testing JSTL pages. Surely more readers will be familiar with MySQL or PostgreSQL than hsqldb. Troubleshooting a new RDBMS while learning a new app server didn’t sound like much fun, so I did not install hsqldb. Still, it was very simple to connect to an ODBC datasource via a JDBC bridge, and I tested the sql functions with an Access database without any problems.
JSTL in Action is an excellent introduction to the new JavaServer Pages Standard Tag Library. Note that I’m not recommending that you drop your current app server and embrace JSTL, but if you’re at all interested in exploring a new Java implementation, this book is a great place to start. Mr. Bayern clearly has the teacher’s gift, and I’ll look forward to more books form him in the future.
* * *

