Use ForEach to Loop Through ArrayList : ForEach « JSTL « Java Tutorial

<%@ page language="java" contentType="text/html" %>
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="" %>

  // Create an ArrayList with test data
  ArrayList list = new ArrayList();
  Map author1 = new HashMap();
  author1.put("name", "A");
  author1.put("id", new Integer(1));
  Map author2 = new HashMap();
  author2.put("name", "B");
  author2.put("id", new Integer(2));
  Map author3 = new HashMap();
  author3.put("name", "C");
  author3.put("id", new Integer(3));
  pageContext.setAttribute("authors", list);

    <title>Search result: Authors</title>
  <body bgcolor="white">
    Here are all authors matching your search critera:
      <c:forEach items="${authors}" var="current">
          <td><c:out value="${}" /><td>
          <td><c:out value="${}" /><td>
  Download: 939 k)

24.7.1.JSTL ForEach Loop
24.7.2.JSTL ForEach Loop with Begin/End Step
24.7.3.JSTL Integer Controlled Loop
24.7.4.Use JSTL ForEach Tag to Loop Through a String
24.7.5.JSTL ForEach Status Count
24.7.6.JSTL ForEach Loop With Step
24.7.7.Reference Array by Index
24.7.8.Use For Each to Loop Through Comma Delimited String
24.7.9.Use ForEach to Loop Through ArrayList
24.7.10.Use JSTL ForEach to Loop through a Vector
24.7.11.Check Even Odd Number in ForEach Loop