<!--
Link
pageContext : forword
response : sendredirect
Object
request
session
Tag
a
form action
Js
location.href
-->
<%
// Java Link
// forward의 경우만 데이터 전송가능
// 현재의 페이지에서는 전송이 가능하다
request.setAttribute("msg", "hello Data");
// 무적권 데이터 전송됨
// application.setAttribute("msg", "hello Data"); // 무거워서 잘안씀
// session.setAttribute("msg", "hello Data");
// 데이터 전송되지 않음
// response.sendRedirect("NewFile.jsp");
// 데이터 전송 된다
// pageContext.forward("NewFile.jsp");
String str = (String)request.getAttribute("msg");
%>
STR:<%=str %>