jstl演示
整个工程是idea下的maven工程
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
Created by IntelliJ IDEA.
User: hanshan
Date: 2018/2/9
Time: 下午8:59
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page isELIgnored="false" %>
<html>
<head>
<title>Title</title>
</head>
<body>
<%
request.setAttribute("count",10);
%>
${count}
<c:if test="${count==10 }">
xxxx
</c:if>
<c:forEach begin="0" end="5" var="i">
${i}<br/>
</c:forEach>
<c:forEach items="${userList }" var="user">
<p>
<a href="baidu.com" >${user.name}</a>
</p>
</c:forEach>
</body>
</html>