<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:import url="header.jsp" />
<section>
<br><br>
<div align="center"><font size=5> 회원목록보기 </font></div> <br>
<div align="center">
<br><br>
<table border=1 width=800 height=250>
<tr><td>회원번호</td><td>회원성명</td> <td>전화번호</td>
<td>주소</td><td>가입일자</td><td>고객등급</td><td>거주지역</td></tr>
<c:forEach items="${list}" var="m">
<tr>
<td>${m.getCustno()}</td>
<td>${m.getCustname()}</td>
<td>${m.getPhone()}</td>
<td>${m.getAddress()}</td>
<td>${m.getJoindate()}</td>
<td>${m.getGrade()}</td>
<td>${m.getCity()}</td>
</tr>
</c:forEach>
</table>
</div>
</section>
<c:import url="footer.jsp" />
@RequestMapping(value="/member_list.do")
public String list(MemberVO vo, Model m) throws Exception{
m.addAttribute("list", s.selectAllmember(vo));
return "member_list.jsp";
}
@Override
public List<MemberVO> selectAllmember(MemberVO vo) {
return dao.selectAllmember(vo);
}
@Override
public List<MemberVO> selectAllmember(MemberVO vo) {
return jdbcTemplate.query(select_sql, new rowMapper());
}
class rowMapper implements RowMapper<MemberVO>{
@Override
public MemberVO mapRow(ResultSet rs, int rowNum) throws SQLException {
MemberVO vo = new MemberVO();
vo.setCustno(rs.getInt("custno"));
vo.setCustname(rs.getString("custname"));
vo.setPhone(rs.getString("phone"));
vo.setAddress(rs.getString("address"));
vo.setJoindate(rs.getString("joindate"));
vo.setGrade(rs.getString("grade"));
vo.setCity(rs.getString("city"));
return vo;
}
}