How do I get all the parameterNames in an HTML form in the same sequence as they are in the form.
i.e if the form contains .... FirstName, LastName, MiddleName and
Updated: U can user sorted set for that. note that u must have all the parameter with different name. (in this case it is most likely) Write any pref.ix as your parameter name for ex.
and so on...
then in java code you can write
SortedSet ss = new TreeSet();
Enumeration enm=request.getParameterNames();
while(enm.hasMoreElements())
{
String pname = enm.nextElement();
}
Iterator i=ss.iterator();
while(i.hasNext())
{
String param=(String)i.next();
String value=request.getParameter(param);
}