JSP 표준 태그 > 페이지 사이 이동 제어 or 자바빈즈 생성할 때 사용
<jsp:태그명/>
태그처럼 보이지만 WAS(Web Application Server)를 통해 JSP가 수행된다.
<jsp:include>
외부 파일을 현재 파일에 포함시킨다.
<jsp:forward>
다른 페이지로 요청을 넘긴다.
<jsp:useBean><jsp:setProperty/><jsp:getProperty/>
자바빈즈를 생성하고 값을 설정/추출한다.
<jsp:param>
다른 페이지로 매개변수를 전달.<jsp:include>와 <jsp:forward>액션태그와 같이 사용.

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
</head>
<body>
<h2>외부 파일</h2>
<%
String newVar1 = "고구려 세운 동명왕"; //변수 선언
%>
<ul>
<li>page 영역 속성 : <%= pageContext.getAttribute("pAttr") %></li>
<li>request 영역 속성 : <%= request.getAttribute("rAttr") %></li>
</ul>
</body>
</html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>OuterPage</title>
</head>
<body>
<h2>외부 파일2</h2>
<%
String newVar2 = "백제 온조왕"; //outerpage1에서 변수와 내용 바꿔줌.
%>
<ul>
<li>page 영역 속성 : <%= pageContext.getAttribute("pAttr") %></li>
<li>request 영역 속성 : <%= request.getAttribute("rAttr") %></li>
</ul>
</body>
</html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
String outerPath1 = "./OuterPage1.jsp";
String outerPath2 = "./OuterPage2.jsp";
pageContext.setAttribute("pAttr", "동명왕");
request.setAttribute("rAttr", "온조왕");
%>
<html>
<head>
<title>지시어와 액션 태그 동작 방식 비교</title>
</head>
<body>
<h2>지시어와 액션 태그동작 방식 비교</h2>
<h3>지시어로 페이지 포함하기</h3>
<%@ include file="./OuterPage1.jsp"%>
<p>외부 파일에 선언한 변수 : <%=newVar1%></p>
<h3>액션 태그로 페이지 포함하기</h3>
<jsp:include page="OuterPage2.jsp"/>
<jsp:include page="<%=outerPath2%>"/>
<p>외부 파일에 선언한 변수 : <%--=newVar2--%></p>
</body>
</html>

forward는 현재 페이지에 들어온 요청을 다음 페이지로 보내는 역할
request 객체를 공유한다.
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
pageContext.setAttribute("pAttr", "김유신");
request.setAttribute("rAttr", "계백");
%>
<html>
<head>
<title>액션태그-forward</title>
</head>
<body>
<h2>액션 태그를 활용한 포워딩</h2>
<jsp:forward page="ForwardSub.jsp"></jsp:forward>
</body>
</html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>forward</title>
</head>
<body>
<h2>포워드 결과</h2>
<ul>
<li>
page 영역 : <%= pageContext.getAttribute("pAttr") %>
</li>
<li>
request 영역 : <%= request.getAttribute("rAttr") %>
</li>
</ul>
</body>
</html>
