Created
May 31, 2013 11:50
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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