<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><html><head><title><c:forEach>YOUR CODE </title></head><body><c:forEach var="i" begin="1" end="5"> NAME <c:out value="${i}"/><p></c:forEach></body></html>这将产生以下结果:
NAME 1NAME 2NAME 3NAME 4NAME 5
上面是最简单的例子。
<table> <c:forEach var="student" items="${person.person}" varStatus="counter"> <c:choose> <c:when test="${counter.count % 2 == 0}"> <c:set var="rowStyle" scope="page" value="odd"/> </c:when> <c:otherwise> <c:set var="rowStyle" scope="page" value="even"/> </c:otherwise> </c:choose> <tr > <td>${student.name}</td> <td>${student.age}</td> <td>${student.height}</td> </tr> </c:forEach> </table>这样您就可以使用
<c:forEach> </c:forEach>TAG。
如果您有任何具体问题,请解释



