add
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>회원가입 폼입니다</h1>
<form action="/member2/add" method="post">
<table>
<tr>
<td>이메일</td>
<td><input type="text" name="addr"></td>
</tr>
<tr>
<td>아이디</td>
<td><input type="text" name="id"></td>
</tr>
<tr>
<td>비밀번호</td>
<td><input type="password" name="password"></td>
</tr>
<tr><td colspan="2" ><input type="submit" value="회원가입하기"></td></tr>
</table>
</form>
</body>
</html>
list
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>회원 리스트 명단</h1><a href="/member2/add">회원가입</a>
<table border="1" style="border-collapse:collapse">
<tr><td>이메일주소</td><td>아이디</td><td>비밀번호</td></tr>
<c:forEach items="${mlist}" var="member">
<tr><td>${member.addr}</td><td><a href="detail?id=${member.id}">${member.id}</a></td><td>${member.password}</td></tr>
</c:forEach>
</table>
<c:if test="${pageMaker.prev}">
<a href="/member2/list?pageNum=${pageMaker.startPage-1}&amount=${pageMaker.cri.amount}">이전</a>
</c:if>
<c:forEach var="num" begin="${pageMaker.startPage}" end="${pageMaker.endPage}">
<a href="/member2/list?pageNum=${num}&amount=${pageMaker.cri.amount}">${num}</a>
</c:forEach>
<c:if test="${pageMaker.next}">
<a href="/member2/list?pageNum=${pageMaker.endPage+1}&amount=${pageMaker.cri.amount}">다음</a>
</c:if><br>
<form action="/member2/list" method="get">
<select name="type">
<option value="i">아이디</option>
<option value="a">이메일</option>
</select>
<input type="text" name="keyword">
<input type="submit" value="회원검색">
</form>
</body>
</html>
detail
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="/resources/js/mdetail.js"></script>
<title>Insert title here</title>
</head>
<body>
<h1>회원정보조회</h1>
<form action="/member2/update" name="frm1" method="post">
<table border="1" >
<tr><td>이메일주소</td><td>
<input type="text" name="addr" value="${mdetail.addr}"></td></tr>
<tr><td>아이디</td><td><input type="hidden" name="id" value="${mdetail.id}" >${mdetail.id}</td></tr>
<tr>
<td>비밀번호</td><td>
<input type="password" name="password" value="${mdetail.password}"></td>
</tr>
<tr><td colspan="2"> <input type="submit" value="수정하기" onclick="javascript: form.action='/member2/update';"/>
<input type="submit" value="삭제하기" onclick="javascript: form.action='/member2/delete';"/></td></tr>
</table>
</form>
</body>
</html>
'Programming > 게시판 만들기' 카테고리의 다른 글
[게시판 만들기] MAPPER (0) | 2021.02.14 |
---|---|
[게시판 만들기] DTO (0) | 2021.02.14 |
[게시판 만들기] board controller / member controller (0) | 2021.02.14 |
[게시판 만들기] addmember / login / boardwrite / boardmodify / boardlist / boarddetail (0) | 2021.02.14 |
[게시판 만들기] detail / write / update / list (0) | 2021.02.14 |