This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

request.getParameterNames display order  RSS feed

 
Boon Subra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi All,
In the below code what is the order of display form a checkbox.
Pl. help
Enumeration eval=request.getParameterNames();
for(int i=0;eval.hasMoreElements();i++)
{
String check=(String)eval.nextElement();
if(check.startsWith("COMP"))
{
//out.println("hi");
String claimtypecompcombi = request.getParameter(check);
StringTokenizer stcombi= new StringTokenizer(claimtypecompcombi,"@");
String claimtypecomp= stcombi.nextToken();
String claimtypename= stcombi.nextToken();

policyclaimcomp = policyclaimcomp+"/"+claimtypename;
}// if check COMP
}//for
policyclaimcomp = policyclaimcomp.substring(1);
out.println(policyclaimcomp);
%>
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that the request object has a HashMap to hold parameters so you can NOT rely on any particular order. You might use some sort of naming convention for form parameters to control the order of retrieval.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!