<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!-- Intro15.jsp -->   
<!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 action="Intro15pro.jsp" method="post">
id:<input type="text" name="id"><p>
이름:<input type="text" name="name"><p>
Email:<input type="text" name="email">
<input type="submit" value="Ok">
</form>
</body>
</html>


**********   Intro15pro.jsp    **********
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<%@ page import="java.net.*" %>   
<!-- Intro15pro.jsp -->   
<!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>
<% request.setCharacterEncoding("euc-kr"); %>
Intro15pro의 출력내용.
<form method="post" action="Intro16.jsp">
id:<%=request.getParameter("id") %><p/>
name:<%=request.getParameter("name") %><p/>
email:<%=request.getParameter("email") %><p/>
<!--
만일 중간에 경유하는 웹페이지가 지금처럼 폼을 사용하는 경우라면
값의 전달을 아래와 같이 히든을 두어 지속적으로 넘겨줄 수 있다.
-->
<input type="hidden" name="id" value="<%=request.getParameter("id") %>">
<input type="hidden" name="name" value="<%=request.getParameter("name") %>">
<input type="hidden" name="email" value="<%=request.getParameter("email") %>">
<input type="submit" value="확인">
</form>
</body>
</html>


**********  Intro16.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>
<% request.setCharacterEncoding("euc-kr"); %>

당신이 입력한 값은 다음과 같습니다.<p/>
id:<%=request.getParameter("id") %><p>
name:<%=request.getParameter("name") %><p>
email:<%=request.getParameter("email") %><p>
</body>
</html>

Posted by 말없제이
,