You need to include the following tag libraries and libraries in your JSP
<%@ taglib uri= "Http://java.sun.com/jsp/jstl/core" prefix= "C"%>//must <%@ taglib uri= "http://java.sun.com/jsp /jstl/fmt "prefix=" FMT "%>//need to format some parameters when used, not required
<%@ taglib prefix= "FN" uri= "http://java.sun.com/jsp/jstl/functions"%>//the function to be used when processing data, not required
1. Traversing list< objects >
<c:foreach items= "${list}" var= "list" varstatus= "status" >
${list.name}
</c:forEach>
2. Traverse list<string>
<c:foreach items= "${optlist}" var= "Optlist" varstatus= "status" >
${optlist}
</c:forEach>
3. Traverse list<map<string,string>>
<c:foreach var= "name" items= "${a}" > <c:foreach var= "entry" items= "${name}" > <c:out value= "${entry. Key} "/> <c:out value=" ${entry.value} "/> </c:forEach> </c:forEach>
4. Traverse the Map
<c:foreach items= "${map}" var= "Mymap" > <c:out value= "${mymap.key}"/> <c:out value= "${mymap. Value} "/> </c:forEach>
5.if use
First, add in the JSP
<c:if test= "${salary >" > <p>my Salary is: <c:out value= "${salary}"/><p></c:if >
6.choose Label
<c:choose>
<c:when test= "${param<=2}" >
1 </c:when>
<c:when test= "${param>=2}" >
2 </c:when> <c:otherwise>
${param}
</c:otherwise> </c:choose>
Java enterprise-Class generic rights security framework source SPRINGMVC MyBatis or Hibernate+ehcache Shiro Druid Bootstrap HTML5
"Java Framework source code download"
JSTL foreach and if when labels are used