You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Aaron Knauf <Aa...@geniesystems.com> on 2000/11/23 22:54:50 UTC

decoding of post parameters

Hi,

I am using tomcat to run a servlet which receives a posted form from 
another application and uses the parameters to update a database.  The 
servlet is well tested and proven and there have been no changes to it for 
a long time.

Recently, the data that is being inserted into the DB is turning up in its 
encoded form.

My question is not really specific to tomcat, but I figured that someone 
on this forum would know the answer (which is why  I posted to tomcat-dev, 
too).

I have read the servlet spec, the API docs, the HTTP RFC and I cannot find 
anything which clearly states whether HttpServletRequest.getParameter() 
should return the encoded or decoded parameter.  My understanding has 
always been that the decoded param should be returned, but I can't find 
that written down anywhere.

I suspect that it is controlled by a HTTP header.  (Maybe 
Transfer-Encoding.)  But I am unsure.

If anyone can clarify this for me, I would be grateful.

Thanks

--------------------------------------------------------------------------------
Aaron Knauf
Systems Integrator
Genie Systems Ltd
Auckland, New Zealand
Ph. +64-9-573 3310 x812
email: aaronk@geniesystems.com
http://www.geniesystems.com
--------------------------------------------------------------------------------