<c:set> <c:choose>
<c:set var="salary" scope="session" value="${2000*2}"/> <p>Your salary is : <c:out value="${salary}"/></p> <c:choose> <c:when test="${salary <= 0}"> Salary is very low to survive. </c:when> <c:when test="${salary > 1000}"> Salary is very good. </c:when> <c:otherwise> No comment sir... </c:otherwise> </c:choose> </body>
Your salary is : 4000 Salary is very good.
c:foreach
<c:forEach items="${fieldList}" var="item"> <option value="${item.id}" <c:if test="${item.id==archive.type}"> selected=selected</c:if> > ${item.labelname}</option> </c:forEach>
了解更多查看 https://www.tutorialspoint.com/jsp/jsp_standard_tag_library.htm