Skip to content

Instantly share code, notes, and snippets.

@francoisgeorgy
Created March 25, 2020 07:51
Show Gist options
  • Select an option

  • Save francoisgeorgy/331e1f59de54177d727da540b7195ceb to your computer and use it in GitHub Desktop.

Select an option

Save francoisgeorgy/331e1f59de54177d727da540b7195ceb to your computer and use it in GitHub Desktop.
dump session in Java
private void dumpSession(HttpSession session) {
for (Enumeration e = session.getAttributeNames(); e.hasMoreElements();) {
String name = (String)e.nextElement();
LOG.debug("session: {}={}", name, session.getAttribute(name));
}
}
dumpSession(request.getSession());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment