1 2 3 4 5 6 7 | <c:if test=" expression" var=" name" scope=" scope"> body content </c:if> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <table> <c:forEach items= "${entryList}" var="blogEntry" varStatus="status"> <c:if test="${status.first}"> <tr><td align="left" class="blogDate"> <cut value="${blogEntry.created}"/> </td></tr> </c:if> <tr><td align="left" class="blogTitle"> <cut value="${blogEntry.title}" escapeXml="false"/> </td></tr> <tr><td align="left" class="blogText"> <cut value="${blogEntry.text}" escapeXml="false"/> </td></tr> </c:forEach> </table> |
1 2 3 4 5 6 7 8 9 10 11 12 | <c:choose> <c:when test=" expression"> body content </c:when> ... <ctherwise> body content </ctherwise> </c:choose> |
1 2 3 4 5 6 7 8 9 10 11 | <c:choose> <c:when test="${pageContext.request.scheme eq 'http'}"> This is an insecure Web session. </c:when> <c:when test="${pageContext.request.scheme eq 'https'}"> This is a secure Web session. </c:when> <ctherwise> You are using an unrecognized Web protocol. How did this happen?! </c:otherwise> </c:choose> |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |