You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Allistair Crossley <Al...@QAS.com> on 2004/10/26 09:58:47 UTC
RE: ENCTYPE + SetCharacterEncodingFilter = no go joe for Tomcat
5.0.28
When a form has the ENCTYPE="multipart/form-data" specified, the data sent is not accessible via the request.getParameter method. You should only really need the ENCTYPE when the form is posting files.
This is nothing to do with Tomcat. You need to decode the data using something like Commons FileUpload 1.0 or similar.
Cheers, Allistair.
> When using ENCTYPE="multipart/form-data" in a form on a jsp page, text
> sent ignores the SetCharacterEncodingFilter which is calling
> request.setCharacterEncoding("UTF-8");
>
> I thought about getting parameter values by using
>
> String field = request.getParameter("whatever");
> field=new String(field.getBytes
> ("UTF-8"));
>
> Does this seem a reasonable approach or is should the
> SetCharacterEncodingFilter *really* be setting the charEncoding?
>
> I don't want to be creating a new string for every parameter unless
> necessary.
>
> When ENCTYPE is not set, all works as expected.
>
> This problem is seen on Tomcat 5.0.28, but not 4.x versions. I
> understand something changed around 5.0.27 for UTF-8 handeling but am
> not sure if that is realated.
>
> --
> Shawn <ja...@koyuru.com>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org