Chapter 4. Iteration Actions
Topics in This Chapter
The <c:forEach> Action
The <c:forTokens> Action
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:
LoopTagStatus, respectively. This chapter describes the <c:forEach> and <c:forTokens> actions and shows ...