Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing parameter names in the proper order  RSS feed

 
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: 65893
135
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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!