jsp获取SessionID值

<%
HttpSession s = request.getSession();
s.setAttribute("name","test");
%>
Session属性值:<%=s.getAttribute("name") %>
SessionID:<%=s.getId()%>

原文地址:https://www.cnblogs.com/chenweichu/p/5614286.html