req_post01
<%@ 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>
<form action="req_post02.jsp" method="post">
아이디:<input type="text" name="id"><br>
이메일:<input type="email" name="email"><br>
<input type="submit" value="확인"><br>
</form>
</body>
</html>
req_post02
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");//post 한글처리. 반드시 맨 위에
String id=request.getParameter("id");
String email=request.getParameter("email");
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%=id%><br>
<%=email%>
</body>
</html>
'JSP' 카테고리의 다른 글
221129 JSP POST 실습 (0) | 2022.11.29 |
---|---|
221129 JSP request (0) | 2022.11.29 |
221129 HTML JSP GET방식 form태그 없이 (0) | 2022.11.29 |
221129 HTML JSP HttpRequest (0) | 2022.11.29 |
221129 HTML Servlet-url mapping과 web.xml 설정파일 수정 (0) | 2022.11.29 |