Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dannytranlx/6542142 to your computer and use it in GitHub Desktop.
Save dannytranlx/6542142 to your computer and use it in GitHub Desktop.
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