tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin van Dijken" <>
Subject Order of parameters
Date Wed, 08 Oct 2003 09:46:06 GMT
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:

View raw message