Using Enumeration e = request.getParameterNames Is there any way to grab
the paramNames from an html form in the order in which they appeared on
that form.  OR, what is the method in which getParameterNames grabs
parameters from a form.  I have found no set pattern in which it grabs form
parameters.

Example HTML form:
<form action="FooServlet">
<input type="checkbox" name="ITEM_3" value="A"> ITEM3
<input type="checkbox" name="ITEM_1" value="B"> ITEM1
<input type="checkbox" name="ITEM_2" value="C"> ITEM2
</form>

Servlet snippet:
Enumeration foo = request.getParameterNames();
while (foo.hasMoreElements()) {
        htmlout.println(ParamName)
        htmlout.println(ParamValue)
}

Output:
ITEM_2 equals C
ITEM_3 equals A
ITEM_1 equals B

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to