View Session Date using JSTL : Session « JSTL « Java Tutorial






<%@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>
  Download:  JSTLViewSessionDate.zip( 938 k)







24.29.Session
24.29.1.Use JSTL to Deal with Session
24.29.2.Get HTTP Session by using JSTL
24.29.3.View Session Date using JSTL
24.29.4.Update Session Date using JSTL
24.29.5.Set Variable Scope to Session
24.29.6.Remove Attribute From Session