Created
September 12, 2013 18:48
-
-
Save dannytranlx/6542142 to your computer and use it in GitHub Desktop.
Not mine, saving for quick access!
http://mishranam.blogspot.ca/2012/03/printing-all-request-parameters-from.html
This file contains hidden or 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("To out-put All the request-attributes received from request - "); | |
Enumeration enAttr = request.getAttributeNames(); | |
while(enAttr.hasMoreElements()){ | |
String attributeName = (String)enAttr.nextElement(); | |
System.out.println("Attribute Name - "+attributeName+", Value - "+(request.getAttribute(attributeName)).toString()); | |
} | |
System.out.println("To out-put All the request parameters received from request - "); | |
Enumeration enParams = request.getParameterNames(); | |
while(enParams.hasMoreElements()){ | |
String paramName = (String)enParams.nextElement(); | |
System.out.println("Attribute Name - "+paramName+", Value - "+request.getParameter(paramName)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment