JSP/기본(Oracle)
JSP 리다이렉트(redirect)이용해서 페이지 이동하기
Bohemian life
2012. 5. 30. 15:01
responseA.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!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=UTF-8"> <title>responseA</title> </head> <body> 현재 페이지는 responseA입니다. 화면에 보여지지 않습니다. </body> </html> <% response.sendRedirect("/01.HelloJsp/responseB.jsp"); %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!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=UTF-8"> <title>responseB</title> </head> <body> responseB.jsp 입니다. </body> </html>
responseA.jsp 실행화면