Import JSTL Tag Library
<%@ taglib uri= "Http://java.sun.com/jsp/jstl/core" prefix= "C"%>
Need to import Jstl.jar and Standard.jar
C:foreach--> Iteration Label Iteration list or map
<c:foreach var= "Person" items= "${list}" >
${person.name}</br>
</c:forEach>
<c:foreach var= "entry" items= "${map}" > Iterate over Set collection returned by Map.entryset ()
${entry.key}: ${entry.value}
</c:foreach>
<c:foreach var= "num" begin= "1" end= "9" step= "1" >
${num}
</c:forEach>
<!--${status} Gets an object that contains the current iteration-->
<c:foreach var= "str" items= "${list}" varstatus= "status" >
<tr class= "${status.count%2==0?" Even ': ' Odd '} ' >
</c:forEach>
C:if--> judgment Label
<c:if test= "${user!=null}" var= "result" > user exists, result is true
Welcome: ${user.username}
</c:if>
${result}
C:out
<c:out value= "${data}" default= "AAAAA" escapexml= "true" ></c:out>
C:set
<!--C:set can manipulate each domain JavaBean map Collection-->
<c:set var= "Data" value= "xxxxxx" scope= "page" ></c:set> change the value of data;
<c:set property= "PropertyName" value= "Valuexx" target= "${map}" ></c:set>
${map.propertyname}
<c:set property= "name" value= "uuuuuu" target= "${person}" ></c:set>
${p.name}
C:catch
<c:catch var= "Ex" >
<%
int x = 1/0;
%>
</c:catch>
${ex.message}
C:fortokens--> Split Label
<c:fortokens var= "ss" items= "${data1}" delims= "," >
${SS}
</c:forTokens>
data1={"A,b,c,d"}
C:url--> Generate URL
<c:url var= "Uurrll" value= "/example/ind1ex.jsp" >
<c:param name= "Namechina" value= "China" ></c:param>
</c:url>
<a href= "${uurrll}" >hreftext</a>