JSTL 递增序号

1、 

<c:forEach items="${signBusList}" var="sign" varStatus="xh"> 

       ${xh.count}序号从1开始 

      ${xh.index}序号从0开始 

      ${xh.last}最后一个序号 

     ${xh.first}第一个序号 

</cforEach> 




2、 

<c:set value="${(page.pageNo-1)*page.pageSize}" var="i" scope="page"/> 
<c:forEach var="preference" items="${page.list}" varStatus="status"> 
  <c:set value="${pageScope.i + 1}" var="i" scope="page"/> 

序 号:${pageScope.i} 
</c:forEach> 


3. <c:forEach var="entity" items="${pageData.result}" varStatus="xh"> 
              <tr> 
              

  <td>${xh.count}</td>

原文地址:https://www.cnblogs.com/LingCoder/p/9432081.html