The Kat's Work - Blog
Main | Blog | Registration | Login
Friday
2017-11-17
5:16 PM
Welcome Guest | RSS
Main » 2011 » August » 23 » Looping through all request parameters in Java.
12:07 PM
Looping through all request parameters in Java.
Simple few lines of code to loop through a request and print out every parameter and its value.

Enumeration parameterNames = request.getParameterNames();

while (parameterNames.hasMoreElements()){ 
 String requestName = (String)parameterNames.nextElement();
 String comment = equest.getParameter(requestName);

 System.out.println(requestName);
 System.out.println(comment);
}
Views: 2201 | Added by: The_Kat | Tags: JAVA, getParameterNames, Request | Rating: 0.0/0
Total comments: 0
Name *:
Email *:
Code *:
Login form
Adverts
Search
Calendar
«  August 2011  »
SuMoTuWeThFrSa
 123456
78910111213
14151617181920
21222324252627
28293031
Entries archive
Site friends
  • Create your own site
  • Spree4.com
  • My Blog
  • Statistics

    Total online: 1
    Guests: 1
    Users: 0
    spree4
    Copyright MyCorp © 2017
    Website builderuCoz