`

JSTL常用

    博客分类:
  • JAVA
阅读更多

<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

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics