examples.cluster-j2ee14.etc.resources.web.jsp.checkRsp.jsp Maven / Gradle / Ivy
<%@ page session="false" %>
<%
Cookie[] cookies = request.getCookies();
HttpSession session = request.getSession(false);
%>
Check session
check Servlet output
<%= (session != null ? "Logged in.
Session ID: " + session.getId() + "" : "
No session.
") %>
<%
if ( cookies != null)
for (int i=0; i < cookies.length;i++)
out.println(cookies[i].getName()+ ": " + cookies[i].getValue() + "
");
%>
<%=request.getAttribute("sessionCheckInfo")%>
>go to session,
<% if (session != null) out.println("logout, ");%>
>check session,
>home.
Sample is OK.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy