예상 로직

회원정보버튼 클릭 → 비번확인창 → 일치하면 form 창을 반환 → form action → 받은걸로 요청처리

내꺼

결과

풀이

header.jsp

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/25daf125-e45f-4f63-bad1-f630864b9a81/Untitled.png

Controller.java

// 회원정보수정
	@GetMapping("/member/modify")
	public String modify() {
		// 회원 본인 맞는지 패스워드 입력화면 응답
		return "member/modifyPasswd";
	}

modifyPasswd.jsp

<!-- Forms -->
			<div class="row">
				<h4 class="center-align">회원정보수정</h4>
				<hr style="margin-bottom: 50px;">

				<form id="frm" class="col s12 l6 offset-l3" action="/member/modifyValid" method="post">
					<div class="row">
						<div class="input-field col s12">
							<i class="material-icons prefix">assignment_ind</i> <input type="text" value="${memberVO.id}" id="member_id" class="validate" disabled> <label for="member_id">아이디</label>
						</div>
					</div>
					<div class="row">
						<div class="input-field col s12">
							<i class="material-icons prefix">lock</i> <input type="password" name="passwd" id="password" class="validate"> <label for="password">비밀번호</label>
						</div>
					</div>

					<div class="row center-align">
						<button type="submit" class="btn waves-effect waves-light">
							본인확인하기 <i class="material-icons right">directions_run</i>
						</button>
					</div>
					<div class="row">
						<blockquote>
							본인 인증 후 정보 수정이 가능합니다.
						</blockquote>
					</div>

				</form>
			</div>
			<!-- end of Forms -->