Skip to content

Instantly share code, notes, and snippets.

@gerjantd
Created April 9, 2013 12:44
Show Gist options
  • Save gerjantd/5345423 to your computer and use it in GitHub Desktop.
Save gerjantd/5345423 to your computer and use it in GitHub Desktop.
Java/JSP: list request attributes
<HTML>
<BODY>
<%
out.println("<DL>");
java.util.Enumeration attrs = pageContext.getRequest().getAttributeNames();
while (attrs.hasMoreElements()) {
String attr = (String) attrs.nextElement();
Object val = pageContext.getRequest().getAttribute(attr);
out.println("<DT>"+attr+"</DT><DD>"+val.toString()+"<DD/>");
}
out.println("</DL>");
%>
</BODY>
</HTML
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment