Chapter 12. The JSP Standard Tag Library

Topics in This Chapter

  • Downloading and installing the standard JSP tag library

  • Reading attributes without using Java syntax

  • Accessing bean properties without using Java syntax

  • Looping an explicit number of times

  • Iterating over various data structures

  • Checking iteration status

  • Iterating with string-based tokens

  • Evaluating expressions conditionally

  • Using the expression language to set attributes

The JSR-052 Expert Group, operating under the Java Community Process, is developing a standard tag library for JSP 1.2 and later. This library, the JSP Standard Tag Library (JSTL), provides standard iteration, conditional-evaluation, and expression-language tags. It also provides simplified access to attributes of the PageContext, HttpServletRequest, HttpSession, and ServletContext objects as well as shorthand methods for accessing bean properties. The availability of JSTL is an important addition to JSP technology because it prevents the proliferation of incompatible tag libraries to perform some of the most common JSP tasks.

However, despite more than 18 months of effort by the JSR-052 group, as of the end of 2001 JSTL was still not finalized. So, this chapter describes the 12/2001 version of the library (Early Access release 1.2). There are certain to be at least minor changes to the library before the final release, so this chapter should be viewed as a general guide to the use of JSTL, not a definitive reference. As the chapter progresses, I’ll alert you to the parts that are most likely to change and point you to online references that will give the final documentation when it becomes available. For updated information, see http://www.moreservlets.com.

Core Warning

The standard tag library was not finalized when this book went to press. The final version is certain to differ in at least minor ways from the version described here.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.144.216