Skip to content

Instantly share code, notes, and snippets.

@izimbra
Created May 31, 2013 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save izimbra/5684475 to your computer and use it in GitHub Desktop.
Save izimbra/5684475 to your computer and use it in GitHub Desktop.
Prints out names and values of parameters of a HTTP request. Useful for using in conditional breakpoints in Eclipse. Since 'false' is returned, this code will only print values, but will not suspend execution. #java #eclipse #http
System.out.println("Request params:");
java.util.Enumeration paramNames = request.getAttributeNames();
while (paramNames.hasMoreElements()) {
java.lang.String name = (java.lang.String) paramNames.nextElement();
java.lang.Object values = request.getAttribute(name);
System.out.println("\t" + name + ": " + values);
}
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment