์ €๋Š” ๋ชจ๋ฐ”์ผ๊ฒŒ์ž„ ๊ฐœ๋ฐœ์ž ๋˜๊ณ ์‹ถ์–ด์„œ ๋ฐฐ์šฐ๊ณ ์žˆ๋Š” ์‚ฌ๋žŒ์ธ๋ฐ.. ์ผ๋‹จ ๊ณผ์ •์ด ์›น ๊ฐœ๋ฐœ์ชฝ์œผ๋กœ ๋˜์žˆ์–ด์„œ ํ”„๋กœ์ ํŠธ ํ•˜๋Š”๋ฐ์งˆ๋ฌธํ•˜๋‚˜๋งŒ๋“œ๋ ค๋„ ๋ ๊นŒ์š”..


MVC๋ชจ๋ธ2 ํ”„๋กœ์ ํŠธ ๋งŒ๋“œ๋Š”๋ฐ.. ๋กœ๊ทธ ๋‹ค์ฐ์–ด๋ดฃ๋Š”๋ฐ ๋ฆฌ์ŠคํŠธ์—๋‹ด์•„๋Š” ์ง„๊ฑฐ ๊ฐ™์€๋ฐ jsp์—์„œ ๋ฆฌ์ŠคํŠธ๋ฅผ ๋ชป ๋ถˆ๋Ÿฌ์™€์š”..



@RequestMapping(value="/DoctorRequestList", method=RequestMethod.GET)

public String DoctorRequestList(Model model

,@RequestParam(value="currentPage", defaultValue="1") int currentPage

,@RequestParam(value="pagePerRow", defaultValue="10")int pagePerRow) {

logger.debug("DoctorRequestController ์—์„œ DoctorRequestList ์‹คํ–‰");

Map<String,Object> map = doctorRequestService.doctorRequestList(currentPage, pagePerRow);

logger.debug("1๋ฒˆ-1"+map);

logger.debug("1๋ฒˆ"+currentPage);

logger.debug("2๋ฒˆ"+pagePerRow);

model.addAttribute("lastPage", map.get("lastPage"));

model.addAttribute("currentPage", currentPage);

model.addAttribute("list", map.get("list"));

model.addAttribute("lastBlockPage", map.get("lastBlockPage"));

model.addAttribute("firstBlockPage", map.get("firstBlockPage"));

model.addAttribute("totalBlock", map.get("totalBlock"));

logger.debug("30๋ฒˆ"+map.get("list"));

return "/doctorrequest/DoctorRequestList";

}


์ปจํŠธ๋กค๋Ÿฌ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค

<body>

<h1>DoctorRequestList</h1>

<form id="DoctorRequestList" action="${pageContext.request.contextPath}/DoctorRequestList" method="POST">

<table>

<thead>

<tr>

<th>๊ฑด๊ฐ•์ •๋ณด์š”์ฒญ์ฝ”๋“œ</th>

<th>์˜์‚ฌ๊ฐ•์‚ฌ์ฝ”๋“œ</th>

<th>ํšŒ์›์ฝ”๋“œ</th>

<th>์ œ๋ชฉ</th>

<th>์š”์ฒญ๋‚ด์šฉ</th>

<th>์š”์ฒญ๋‚ ์งœ</th>

</tr>

</thead>

<tbody>

<c:forEach var="DoctorRequest" items="${list}">

<tr>

<td>${DoctorRequest.RequestHealthInformationNo}</td>

<td>${DoctorRequest.TeacherNo}</td>

<td>${DoctorRequest.MemberNo }</td>

<td>${DoctorRequest.RequestTitle }</td>

<td>${DoctorRequest.RequestContent }</td>

<td>${DoctorRequest.RequestDate }</td>

<%-- <td><a type="button" href="${pageContext.request.contextPath}/modifyBloodsugar?bloodsugarno=${bloodsugar.bloodsugarno}" id="buttonModify">์ˆ˜์ •</a></td>

<td><a type="button" href="${pageContext.request.contextPath}/deleteBloodsugar?bloodsugarno=${bloodsugar.bloodsugarno}" id="buttonDelete">์‚ญ์ œ</a></td>ย  ย --%>

</tr>