<%@ page import="java.lang.reflect.Array" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    ArrayList<String> people = new ArrayList<>();
    people.add("张三");
    people.add("李四");
    people.add("王五");
    people.add("赵六");
    people.add("田七");
    request.setAttribute("list",people);
%>

<%--var是将循环到的每一个变量都命名为他的值，items是循环的列表--%>
<c:forEach var="people" items="${list}">
<c:out value="${people}"/><br>

</c:forEach>

</body>
</html>
