tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: parameter order
Date Fri, 21 Feb 2003 08:33:31 GMT

"rf" <rufoo2001@yahoo.com> wrote in message
news:20030221081607.26020.qmail@web13201.mail.yahoo.com...
>
> StringBuffer sb = new StringBuffer();
> Enumeration en = req.getParameterNames();
> for (; en.hasMoreElements() ;) {
>     String param = (String) en.nextElement();
>     String value = req.getParameter (param);
>     sb.append(param).append(":
> ").append(value).append("\n");
> }
>
>
> The order of the parameters is not clear - it is
> neither alphabetical nor as specified in the html
> form.
> Is it that IE is ordering the parameters in such way
> when POSTing the data? Anybody knows about this? This
> is just out of curiousity, not really needed anywhere.

There is no specified order in either the Servlet-spec or the HTTP-spec.
You shouldn't rely on any ordering.

That having been said, I believe that Tomcat returns them in the same order
that HashMap.getKeys does.

>
> Thanks
> rf
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message