All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.cluster-j2ee14.etc.resources.web.jsp.checkRsp.jsp Maven / Gradle / Ivy

There is a newer version: 5.3.0
Show newest version
<%@ 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