forwardForm


아이디 :

취 미 :

"> ex01_forward

forwardForm


아이디 :

취 미 :

"> ex01_forward

forwardForm


아이디 :

취 미 :

">
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ex01_forward</title>
</head>
<body>
	<h1>forwardForm</h1>
	<br>
	<form action="ex01_forwardTest.jsp" method="post">
		아이디 : <input type="text" name="id">
		<br/><br/>
		취 미 : <select name="hobby">
					<option value="game">게임</option>
					<option value="study">공부</option>
					<option value="music">음악감상</option>
			   </select>
		<br/><br/>
		<input type="submit" value="완료"/>
	</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("utf-8");
%>
<br/>
<jsp:forward page="ex01_forwardTo.jsp"/>
<br/>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String id = request.getParameter("id");
String hobby = request.getParameter("hobby");
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ex01_forwardTo</title>
<style type="text/css">
p {
	font-size: 24px;
}
</style>
</head>
<body>
	<h1>forwardTo</h1>
	<hr>
	<p> 포워딩되는 페이지 ex01_forwardTo.jsp </p>
	<p><%=id %> 의 취미는 <%=hobby %> 입니다.</p>
	
</body>
</html>

<aside> ⚡ 결과값

마지막 경로는 forwardTest.jsp

Untitled

</aside>