JSTL: JSP Standard Tag Library Kick Start By Jeff Heaton
Table of Contents
Chapter 5. Collections, Loops, and Iterators
Collections have always been an important part of JSP programming. JSP pages often receive collections of objects, such as rows from a database that must be displayed to the HTML user. JSTL provides several tags that enable the JSP programmer to work with collections of objects. These tags allow a more consistent approach to handling collections than scriptlet JSP programming provides.
In addition to the ability to iterate over collections of objects, JSTL provides basic parsing into the iteration tags. Token iteration tags allow the programmer to iterate through strings that contain items separated by designated tokens. This allows a string to be tokenized and the results processed in a way that is appropriate for the page.
This chapter will introduce you to both iteration and tokenization. We begin by taking a closer look at the collections that can be used with these tags.