Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing parameter names in the proper order

 
Amitav Anand
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to access the parameter names from an html form in the order in which they appeared on the form using servlet..

I have got some idea for the same,but unable to come up with the solution...
I was trying using TreeMap, but could not do.

Please help me out for this small problem..

Thanks

Amitav Anand
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65658
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no guarantee that request parameters will be placed on the request in any order.

About the only thing you can do -- which is seriously icky -- is to name the parameters such that you can sort them into the order you seek.

Why is this important?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!