<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<form method="post" action="intro02pro.jsp">
id : <input type="text" name="id"><p/>
이름 : <input type="text" name="name"><p/>
Email: <input type="text" name="email"><p/>
<input type="submit" value="확인"><p/>
</form>
</body>
</html>

******* intro02pro.jsp ***********
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<!--
Post방식일 경우에는 한글깨짐 문제를 해결하려면
아래의 메서드를 사용해야 한다.
한글이 euc-kr 아닐경우 에러..(비정상적인 글자)
-->
<% request.setCharacterEncoding("euc-kr"); %>
<% out.println(request.getParameter("id")); %><p/>
이름 : <% out.println(request.getParameter("name")); %><p/>
Email: <% out.println(request.getParameter("email")); %><p/>
</body>
</html>
Posted by 말없제이
,