ex1. session

Posted 2008/10/09 13:19, Filed under: 학과수업들/JSP

<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR" %>

<html>
<head>
<title> session.jsp </title>
</head>
<body>

<center>
<h2> session 예제 </h2>
<hr>
<%
	// isNew() 메서드를 이용해 최초세션설정을 확인하고 있다.
	if(session.isNew()) {
		out.println("<script> alert('세션이 해제되어 다시 설정합니다.') </script>");
		session.setAttribute("login","홍길동");
		//session.setMaxInactiveInterval(5);
	}
%>

# <%= session.getAttribute("login") %> 님 환영 합니다.<br>
1. 세션 ID : <%= session.getId() %> <br>
2. 세션 유지시간 : <%= session.getMaxInactiveInterval() %><br>
</center>

</body>
</html>

2008/10/09 13:19 2008/10/09 13:19

Trackback URL : http://mysilpir.net/trackback/313

Leave a comment

« Previous : 1 : ... 18 : 19 : 20 : 21 : 22 : 23 : 24 : 25 : 26 : ... 270 : Next »

블로그 이미지

일상의 이야기를 나누는 공간입니다.

- 실피

Calendar

    «   2009/01   »
            1 2 3
    4 5 6 7 8 9 10
    11 12 13 14 15 16 17
    18 19 20 21 22 23 24
    25 26 27 28 29 30 31

Total 157604 hit (Today 49, Yesterday 185)

Admin Write Post