140 CHAPTER 3: Best Practices in Java EE Web Development
The
The
Here’s the syntax:
<c:forTokens items="stringOfTokens" delims="delimiters"
[var="varName"] [varStatus="varStatusName"]
[begin="begin"] [end="end"] [step="step"]>
... body.........
Table 3-18 describes all the attributes of
Table 3-18.
Name Type Description
var String Name of the exported scoped variable for the current item of the iteration.
items String String of tokens to iterate over.
delims String Set of delimiters (the characters that separate the tokens in the string).
varStatus String Name of the exported scoped variable for the status of the iteration. The object
exported is of type javax.servlet.jsp.jstl.core.LoopTagStatus.
begin int Iteration begins at the token located at the specified index. The first token has index 0.
end int Iteration ends at the token located at the specified index (inclusive).
step int Iteration will process only every step tokens, starting with the first one.
The
the usage of
Listing 3-48. Using