On Mon, 17 Dec 2001, Bob Byron wrote:
> Date: Mon, 17 Dec 2001 08:51:24 -0600
> From: Bob Byron <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED], [EMAIL PROTECTED]
> Subject: Re: Ordering of parameters in HTTPRequest Object
>
> Sean,
>
> Did you find a solution to the parameter ordering issue of a form? I
> am interested in receiving the parameters in order. I want to make
> a generic servlet that emails forms to me and maintains the order
> of the fields on the form. Nothing is "dependent", but aesthetically
> it works out better if I just use the order from the form. It seems
> a shame that the servlet API discards the data. (At least that is
> what I gathered from the previous thread.)
>
There are no guarantees that a browser will send the request parameters in
the order they appear on the form, so there was nothing for the servlet
API to "discard" in this respect.
If you really want to process the parameters in the order the browser sent
them (on the assumption that this matches the form order), you can read
the query string (on a GET) or input stream (on a POST) and parse it
yourself, instead of calling request.getParameter().
> Thank You,
> Bob Byron
>
Craig McClanahan
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>