Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 14804 invoked from network); 23 Nov 2000 20:56:12 -0000 Received: from unknown (HELO vincent.akl.nz.geniesystems.com) (210.55.186.142) by locus.apache.org with SMTP; 23 Nov 2000 20:56:12 -0000 To: tomcat-user@jakarta.apache.org Cc: tomcat-dev@jakarta.apache.org Subject: decoding of post parameters X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000 Message-ID: From: "Aaron Knauf" Date: Fri, 24 Nov 2000 09:54:50 +1200 X-MIMETrack: Serialize by Router on vincent/akl/nz/geniesystems(Release 5.0.5 |September 22, 2000) at 11/24/2000 09:54:59 AM, Serialize complete at 11/24/2000 09:54:59 AM MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_alternative 0073689ACC2569A0_=" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N This is a multipart message in MIME format. --=_alternative 0073689ACC2569A0_= Content-Type: text/plain; charset="us-ascii" 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 -------------------------------------------------------------------------------- --=_alternative 0073689ACC2569A0_= Content-Type: text/html; charset="us-ascii"
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
--------------------------------------------------------------------------------
--=_alternative 0073689ACC2569A0_=--