tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Johnson" <>
Subject RE: Order of parameters
Date Wed, 08 Oct 2003 14:25:47 GMT
  -Across the board browsers are not obligated to behave like this
  -Any servlet that depended on this behavior would be locked into TC

A solution that could work: 
  Directly get the query string with "request.getQueryString()" parse
the results yourself and store the results in the order found.

Chad Johnson

-----Original Message-----
From: Martin van Dijken [] 
Sent: Wednesday, October 08, 2003 4:46 AM
To: Tomcat Developers (E-mail)
Subject: Order of parameters

I've been trying to create an automated form handler. This form handler
could be a lot more effective if the request parameters were in the
order they were put on the form. Now most browsers send this information
over HTTP in the order they were found in the form. However, because the
parameters are in Tomcat put into a Hashtable, the order is lost and can
never be rebuilt.

First of all, does anybody have a problem with a little code to keep the
parameters in order?

Second, please comment my proposed solution: 

The best way I can think of to change this involves creating an
extension of Hashtable. At the moment a parameter is put into the
Hashtable, the key is put into an Arraylist. When
request.getParameterNames() is called, the parameters are returned in
the order they are found in the ArrayList. This would keep the speed of
accessing request.getParameter() fast and put a little overhead at
request creation and getParameterNames.

Martin van Dijken

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message