⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 status.jsp

📁 基于netbeans的java桌面应用程序合集
💻 JSP
字号:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
  <title>JSTL: Iterator Support -- Iteration Status Example</title>
</head>
<body bgcolor="#FFFFFF">
<h3>Iteration Status</h3>

<h4>Using status information: current, index, count, first, last</h4>
<table border="1">
  <tr>
    <th>index</th>
    <th>count</th>
    <th>last name</th>
    <th>first name</th>
    <th>first?</th>
    <th>last?</th>
  </tr>
  <c:forEach var="customer" items="${customers}" varStatus="status">
    <tr>
      <td><c:out value="${status.index}"/></td>
      <td><c:out value="${status.count}"/></td>
      <td><c:out value="${status.current.lastName}"/></td>
      <td><c:out value="${status.current.firstName}"/></td>
      <td><c:out value="${status.first}"/></td>
      <td><c:out value="${status.last}"/></td>
    </tr>
    <c:if test="${status.last}">
      <c:set var="count" value="${status.count}"/>
    </c:if>  
  </c:forEach>
</table>
<p>There are <c:out value="${count}"/> customers in the list.

<p>

<h4>Iteration using range attributes</h4>
<c:forEach var="i" begin="100" end="200" step="5" varStatus="status">
  <c:if test="${status.first}">
    begin:<c:out value="${status.begin}">begin</c:out> &nbsp; &nbsp; 
      end:<c:out value="${status.end}">end</c:out> &nbsp; &nbsp; 
     step:<c:out value="${status.step}">step</c:out><br>
    sequence: 
  </c:if>  
  <c:out value="${i}"/> 
  <c:if test="${status.last}">
    <br>There are <c:out value="${status.count}"/> numbers in the list.
  </c:if>  
</c:forEach>
<p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -