It's not a secret anymore!
The moose likes Servlets and the fly likes getParameterValues order Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "getParameterValues order" Watch "getParameterValues order" New topic

getParameterValues order

Lidia Cyc

Joined: Aug 05, 2003
Posts: 25
i've read that getParameterNames returned Enumeration is not required
to return the parameters in the order they are written in html form.
what about getParameterValues? are the parameter values returned String[] keeps the order of values as they are in the form?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63857

No, there is no order guarentee.

[Asking smart questions] [About Bear] [Books by Bear]
Tom Blough
Ranch Hand

Joined: Jul 31, 2003
Posts: 263
There is not even a guarantee that the BROWSER will send the elements in the order they are defined in the form. Run your form as a GET and look at the order of the elements on the URL. Chances are they will not be in the order you are expecting them.

Tom Blough<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt.<hr></blockquote>
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Hi Cyc. I was wondering where you are from? Because Cyc is a very interesting name. A pretty cool name if you ask me actually.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: getParameterValues order
It's not a secret anymore!