티스토리 뷰

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>회원가입</title>
</head>
<body>
	<form action="post1?category=pass" method="post">
		<p>ID : <input type="text" name="id" required>
		<p>password : <input type="password" name="passwd"  required>
		<p>password 확인 : <input type="password" name="passwd2" required>
		<input type="submit" value="전송">
	</form>
</body>
</html>

WebServlet 매핑 중에 경로 오류로 controller로 다가가질 못했는데,

이 상태에서 submit 하게 되면 

http://localhost:8080/sp1/login/post1?category=pass

login 폴더에 계속 머물게 되어서 상위폴더로 이동 한 뒤에 이동을 시켜주면 된다.

<경로 수정 전>

	<form action="post1?category=pass" method="post">

<경로 수정 후>

	<form action="/sp1/post1?category=pass" method="post">

 

 

'오답 노트' 카테고리의 다른 글

애너테이션 중복 오류  (0) 2024.01.18
Spring GetMapping import오류  (0) 2024.01.18
2312-4주  (0) 2023.12.20
23-12-3주  (0) 2023.12.14
23-12-2  (0) 2023.12.08
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
글 보관함