O'Reilly logo

Java Servlet & JSP Cookbook by Bruce W. Perry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

23.1. Downloading the JSTL 1.0 and Using the JSTL Tags in JSPs

Problem

You want to download and use the JSTL.

Solution

Download the JSTL distribution, in a ZIP or TAR file, from the Apache Jakarta Project.

Discussion

The Apache Jakarta Project hosts the reference implementation (RI) for the JSTL. An RI is software that is designed to implement a particular Java technology specification in order to demonstrate how the software is intended to function. RIs are freely available for use by software vendors and developers. You can download the binary or source distribution of the JSTL from http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html.

Unpack the ZIP or TAR file into the directory of your choice. This creates a jakarta-taglibs directory.

Tip

This recipe uses the Standard Taglib Version 1.0.3, an implementation of the JSTL 1.0. However, by the time you read this, the Jakarta Taglibs site will have introduced Standard Taglib Version 1.1, which is an implementation of the JSTL 1.1. The new version includes some new features such as functions, which are described in Recipe 23.14.

Inside the standard-1.0.3 directory is a lib subdirectory. This directory contains a number of JAR files, including jstl.jar and standard.jar. The jstl.jar contains the JSTL 1.0 API classes; standard.jar is a collection of JSTL 1.0 implementation classes. Add all of the JAR files found in your JSTL distribution's lib directory (jakarta-taglibs/standard-1.0.3/lib in the example) to WEB-INF/lib.

Tip

JSTL 1.1 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required