Skip to Main Content
Core JSTL: Mastering the JSP™ Standard Tag Library
book

Core JSTL: Mastering the JSP™ Standard Tag Library

by David M. Geary
November 2002
Intermediate to advanced content levelIntermediate to advanced
608 pages
12h 17m
English
Pearson
Content preview from Core JSTL: Mastering the JSP™ Standard Tag Library

Chapter 4. Iteration Actions

Topics in This Chapter

  • The <c:forEach> Action

  • The <c:forTokens> Action

  • Iteration Status

  • Custom Iteration Actions

In any programming language, the ability to iterate over a set of values is essential. Before JSTL, JSP did not provide an explicit means to accomplish that fundamental task, so developers had two choices: use a scriptlet or implement a custom action, neither of which is very attractive.

JSTL provides two actions that iterate over a set of values: <c:forEach> and <c:forTokens>. JSTL also exposes an interface and two classes that you can use to implement custom iteration actions: LoopTag, LoopTagSupport, and LoopTagStatus, respectively.[1] This chapter describes the <c:forEach> and <c:forTokens> actions and shows ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JSTL: JSP Standard Tag Library Kick Start

JSTL: JSP Standard Tag Library Kick Start

Jeff Heaton
Core JSP

Core JSP

Damon Hougland, Aaron Tavistock

Publisher Resources

ISBN: 0131001531Purchase book