Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sequence of Parameters

 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys!
Hope you are doing good. I am just not able to figure out why the sequence of parameters gets interchanged here.

My JSP page is like...



and here is the servlet processing behind...



Surprisingly, in browser i get these elements as "bca", "abc", "submit" and "cab" in that order. why so?
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The request parameter name and values represent key-value pairs and hence I would imagine that it would be stored as a Map in the request object. And being a Map, there is no order guaranteed. Neither should it be of any consequence.

ram.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Akhilesh, do you required that parameter should be ordered? If, yes, I can sugget some work around.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic