강의

멘토링

커뮤니티

Inflearn Community Q&A

samgangjumak's profile image
samgangjumak

asked

Spring Framework in my hands [Spring 2]

29_스프2탄_Displaying Page Numbers on the List

질문드립니다.

Written on

·

328

0

 안녕하세요 선생님

 

페이징처리할 때 jsp에서

 

<! -- 페이징 START -->

<div class="pull-right">

<ul class="pagination">

<! -- 이전처리 -->

<! -- 페이지번호 처리-->

<c:forEach var="pageNum" begin="${pageMaker.startPage}" end="${pageMaker.endPage}">

<c:if test="${pageMaker.cri.page != pageNum}">

<li class="page-item"><a class="page-link" href="${cpath}/board/list?page=${pageNum}">${pageNum}</a></li>

</c:if>

<c:if test="${pageMaker.cri.page == pageNum}">

<li class="page-item active"><a class="page-link" href="${cpath}/board/list?page=${pageNum}">${pageNum}</a></li>

</c:if>

</c:forEach>

<! -- 다음처리 -->

 

이런식으로 할 때요 ${cpath}/board/list?page=${pageNum}

이 부분이 ?page=${pageNum} 이렇게 이용을 하는데

컨트롤러에서는 RequestParam이 없는데 되네요?

이 부분 헷갈리는데 설명 부탁드립니다!

springSpring SecurityjqueryJPAMVC

Answer 1

1

bitcocom님의 프로필 이미지
bitcocom
Instructor

?page=${pageNum} ㅡ>Controller에서 Criteria속성에 page가 있기 때문에 자동으로 받을 수가 있습니다. 즉 VO로 받는것입니다.

samgangjumak's profile image
samgangjumak

asked

Ask a question