본문 바로가기

웹/JSP

[JSP] <JSTL> foreach로 생성된 테이블의 행에 index붙이기

  • varStatus를 이용한다.
<tbody>
	<c:forEach var="data" items="${cartList}" varStatus="status">
		<tr id="row_${status.index}">