include directive vs include action tag
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!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=EUC-KR">
<title>Insert title here</title>
<style type="text/css">
a {
text-decoration: none;
font-weight: bold;
color:green;
}
a:hover {
text-decoration: underline;
font-weight: bold;
color:red;
}
</style>
</head>
<body>
<p>이것은 좋은 메뉴</p>
<ul>
<li><a href="page1.jsp">page 1</a></li>
<li><a href="page2.jsp">page 2</a></li>
<li><a href="page3.jsp">page 3</a></li>
<li><a href="page4.jsp">page 4</a></li>
</ul>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!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=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<!-- 아래 두 가지 방법을 사용 -->
<table border="1">
<tr>
<td>
include directive
</td>
<td>
<!-- 변수가 공유 된다. -->
<%@ include file="menu.jsp" %>
</td>
</tr>
<tr>
<td>
include action tag
</td>
<td>
<!-- 변수가 공유 되지 않는다. -->
<jsp:include page="menu.jsp" flush="false"/>
</td>
</tr>
</table>
</body>
</html>