c:forEach 遍历集合中的元素,判断是否是最后一个元素

<c:forEach items="${pointSection}" var="chl" varStatus="stat">
        <c:if test="${!stat.last}" >
         <div class="item" id="_MYJD_repair" style="border-bottom-style: dotted;border-bottom-width: 1px;border-bottom-color: olive">
          <a href="pointProductController.html?flag=flagPProductsection${chl.pointseId}" class="zltda">${chl.section}</a>
         </div>
        </c:if>
        <c:if test="${stat.last}">
         <div class="item" id="_MYJD_repair">
          <a href="pointProductController.html?flag=flagPProductsection${chl.pointseId}" class="zltda">${chl.section}</a>
         </div>
        </c:if>
        </c:forEach>

你可能感兴趣的:(foreach)