使用varStatus的index属性即可: <c: forEach var= "sell" items= "${sellList.list}" varStatus= "idx"> $ {idx. index } </c:forEach>