<%
pageContext.setAttribute("pag_name", "홍길동");
request.setAttribute("req_name", "마길동");
%>
<jsp:forward page="a17_goPage.jsp"/>
## a17_goPage.jsp
<h1>forward된 페이지</h1>
<h2>페이지:<%=pageContext.getAttribute("pag_name")%><h2>
<h2>요청:<%=request.getAttribute("req_name")%><h2>
<form>
아이디:<input type="text" name="id">
<input type="submit">
</form>
<%
String id = request.getParameter("id");
if(id!=null){
if(id.equals("himan")){
%>
<jsp:forward page="a19_main.jsp"/>
<%}else{ %>
<jsp:forward page="a20_error.jsp"/>
<%} %>
<%} %>
## a19_main.jsp
<h2><%=request.getParameter("id") %>로그인성공</h2>
##
<h2><%=request.getParameter("id") %>로그인 실패</h2>