2009년 10월 10일
[JSTL] 페이징 게시판 순번 지정하기
int totalRecord = 0; //전체 레코드 수
int numPerPage = 5; //블럭당 페이지 수
int pagePerBlock = 10;//기본값은 10 페이지블럭수
int beginPerPage = 0; //페이지의 시작레코드번호
int nowPage=1; //현재 페이지번호
beginPerPage = (nowPage-1) * numPerPage;
pageContext.setAttribute("list",list);
pageContext.setAttribute("articleNum",new Integer(totalRecord-beginPerPage));
<c:forEach var="list" items="${list}" varStatus="status">
<c:out value="${articleNum-status.index}"/>
</c:forEach>
[출처] [JSTL] 페이징 게시판 순번 지정하기|작성자 샹그릴라
# by | 2009/10/10 08:32 | 트랙백 | 덧글(0)





☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]