JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
c:forTokens Action Tag
This section describes the c:forTokens action tag in the JSTL Core library. c:forTokens allows you to specify a section of JSP code that will be processed repeatedly by iterating through a list of tokens.
The <c:forTokens> action tag allows you to specify a section of JSP code that will be processed repeatedly by iterating through a list of tokens. Syntax of the <c:forTokens> action tag is:
<c:forTokens var="name" items="token_list" delims="expression" begin="expression" end="expression" step="expression"> body </c:forTokens>
Note that:
In other words, the string specified by the "items" attribute will be tokenized with the delimiter specified by the "delims" attribute. Then resulting tokens will be iterated. At each iteration, the current token will assign to a named variable specified in the "var" attribute, and body will be processed.
If the "begin", "end" or "step" attribute is specified, it will be used to restrict the beginning element, the ending element, or the step size of the iteration.
Table of Contents
JSP (JavaServer Pages) Overview
Tomcat Installation on Windows Systems
Syntax of JSP Pages and JSP Documents
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
Overview of JSTL (JSP Standard Tag Libraries)
c:out Action Tag with EL Expressions
Example - Dumping EL Implicit Objects
Example - Calculating Prime Numbers
Multiple Tags Working Together
Using Tomcat on CentOS Systems
Connecting to SQL Server from Servlet