Apparently the order of request parameters is not preserved in the Tomcat servlet container (per google it seems other containers share the same problem).
This seems very wrong.
How would one restore the actual order of request parameters from a HttpServletRequest?
EDIT
BTW for those that think order for request parameters does not matter there is a difference between:
http://blah?a=1&a=2
and
http://blah?a=2&a=1
So order does matter for duplicate request parameters (luckily Java does handle this right).
Normally you should not depend on the order of parameters. If you are really sure this is necessary, you can:
request.getQueryString()to seeGETparametersrequest.getInputStream()) and read the submittedPOSTparams.