728x90
반응형
idsearch.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- /WEB-INF/view/user/idsearch.jsp --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html><html><head><meta charset="UTF-8">
<title>아이디찾기</title>
<link rel="stylesheet" href="../css/main.css">
</head><body>
<h3>아이디찾기</h3>
<form:form modelAttribute="user" action="idsearch" method="post">
<spring:hasBindErrors name="user">
<font color="red"><c:forEach items="${errors.globalErrors}" var="error">
<spring:message code="${error.code}" />
</c:forEach></font></spring:hasBindErrors>
<table><tr><th>이메일</th><td><input type="text" name="email">
<font color="red"><form:errors path="email" /></font></td></tr>
<tr><th>전화번호</th><td><input type="text" name="phoneno">
<font color="red"><form:errors path="phoneno" /></font></td></tr>
<tr><td colspan="2"><input type="submit" value="아이디찾기"></td></tr></table>
</form:form></body></html>
pwsearch.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- /WEB-INF/view/user/pwsearch.jsp --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html><html><head><meta charset="UTF-8">
<title>비밀번호찾기</title><link rel="stylesheet" href="../css/main.css">
</head><body><h3>비밀번호찾기</h3>
<form:form modelAttribute="user" action="pwsearch" method="post">
<spring:hasBindErrors name="user">
<font color="red"><c:forEach items="${errors.globalErrors}" var="error">
<spring:message code="${error.code}" />
</c:forEach></font></spring:hasBindErrors>
<table>
<tr><th>아이디</th><td><input type="text" name="userid">
<font color="red"><form:errors path="userid" /></font></td></tr>
<tr><th>이메일</th><td><input type="text" name="email">
<font color="red"><form:errors path="email" /></font></td></tr>
<tr><th>전화번호</th><td><input type="text" name="phoneno">
<font color="red"><form:errors path="phoneno" /></font></td></tr>
<tr><td colspan="2"><input type="submit" value="비밀번호찾기"></td></tr>
</table></form:form></body></html>
search.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%-- /WEB-INF/view/search.jsp --%>
<!DOCTYPE html><html><head><meta charset="UTF-8">
<title>${title}찾기</title>
<link rel="stylesheet" href="../css/main.css">
<script type="text/javascript">
function sendclose() {
opener.document.loginform.userid.value='${result}';
self.close();
}
</script>
</head>
<body>
<table>
<tr>
<th>${title}찾기</th>
<td>${result}</td>
</tr>
<tr>
<td colspan="2">
<c:if test="${title=='아이디'}">
<input type="button" value="아이디전송" onclick="sendclose()">
</c:if>
<c:if test="${title!='아이디'}">
<input type="button" value="닫기" onclick="self.close()">
</c:if>
</td>
</tr>
</table>
</body>
</html>
728x90
반응형
'study > Spring' 카테고리의 다른 글
[Spring] 24. Spring (게시글 작성[write.jsp]) (0) | 2022.05.13 |
---|---|
[Spring] 24. Spring (게시판[Board.java, BoardDao.java, BoardController.java, list.jsp]) (0) | 2022.05.13 |
[Spring] 24. Spring (관리자권한설정[AdminController.java, AdminLoginAspect.java]) (0) | 2022.05.12 |
[Spring] 24. Spring (회원목록[list.jsp]) (0) | 2022.05.12 |
[Spring] 24. Spring (회원탈퇴[delete.jsp]) (0) | 2022.05.12 |