<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<html>
    <head>
        <title>
            show session
        </title>
    </head>

    <body>
        <center>
            <h2>获取session</h2>

        <%
            String sessionID= session.getId();
            Long startTime=session.getCreationTime();
            Long endTime=session.getLastAccessedTime();
            Long time =(endTime-startTime)/ 1000;
        %>
        session ID: <%=sessionID%>
        </br>
        停留时间:    <%=time%></center>
        
    </body>
</html>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2021-08-24
  • 2021-12-14
  • 2021-09-30
  • 2022-12-23
猜你喜欢
  • 2022-01-17
  • 2021-09-30
  • 2022-12-23
  • 2021-08-11
  • 2021-12-01
  • 2021-11-10
  • 2021-11-30
相关资源
相似解决方案