세션 설정1
<%@ page contentType="text/html; charset=EUC-KR" %>
<%@ page session = "true" %>
<%
session.setAttribute("NAME", "Jimmy");
session.setAttribute("ADDRESS", "Seoul");
%>
<html>
<head>
<title>세션 속성 설정하기</title>
</head>
<body>
<H3>
세션 속성이 설정되었습니다. <BR>
<A HREF="9-3.jsp">여기</A>를 클릭하면 설정된 속성을 확인할 수 있습니다.
</H3>
</body>
</html>
세션 설정2
<%@ page contentType="text/html; charset=EUC-KR" %>
<%@ page session = "true" %>
<html>
<head>
<title>세션 속성 확인하기</title>
</head>
<body>
<H3>
NAME : <%= session.getAttribute("NAME") %><BR>
ADDRESS : <%= session.getAttribute("ADDRESS") %><BR>
</H3>
</body>
</html>