JSP: view session : Session « JSP « Java






JSP: view session



<%@page contentType="text/html"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<html>
<head><title>View Session JSP </title></head>
<body>
<h2>Session Info From A JSP</h2>
The session id: 

<c:out value="${pageContext.session.id}"/>

<br>

<br>
The session creation time as a long value: 

<c:out value="${pageContext.session.creationTime}"/>

<br>

<br>
The last accessed time as a long value: 

<c:out value="${pageContext.session.lastAccessedTime}"/>

<br>

<br>
</body>
</html>
           
       








Related examples in the same category

1.JSP: display a session info
2.JSP Session Parameter Rewrite
3.JSP New Session Parameter
4.Jsp Session Cart
5.Use Session Jsp
6.Jsp Using Bean Scope Session
7.Print the request headers and the session attributes
8.Using Sessions to Track Users
9.Sessions disabled
10.Duplicated session varaibles
11.JSP and session
12.JSP and session 2
13.JSP session counter