File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "getParameterValues order" Watch "getParameterValues order" New topic
Author

getParameterValues order

Lidia Cyc
Greenhorn

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
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

No, there is no order guarentee.
bear


[Asking smart questions] [Bear's FrontMan] [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
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: getParameterValues order
 
Similar Threads
Unable to get value of URL parameter
requesting values from a multiple select
How To Make an Array from Multiple Selection of a Drop-Down Menu (or Scrollable List)
Multiple Drop Down Boxes With same name
About form submission