JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
c:forEach Action Tag
This section describes the c:forEach action tag in the JSTL Core library. c:forEach allows you to specify a section of JSP code that will be processed repeatedly by iterating through a simple index or a group of elements in a collection.
The <c:forEach> action tag allows you to specify a section of JSP code that will be processed repeatedly by iterating through a simple index or a group of elements in a collection. Syntax of the <c:forEach> action tag is:
<c:forEach items="collection" var="name" begin="expression" end="expression" step="expression"> body </c:forEach>
Note that:
The <c:forEach> action tag behaves like a Java "for" statement. But there is no break mechanism.
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