tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Encoding Issue on POST
Date Sat, 01 Jan 2011 12:26:28 GMT wrote:
> The followings are what I have done for a project in regarding of encoding.
> * <%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%> on the first
line of JSP files
> * <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

That looks fine.

> * Set URIEncoding="UTF-8" on your <Connector> in server.xml

That matters for a GET, but plays no role for a POST.

> * An encoding filter for utf-8. 

Can you expand on that ?

> While the form GET method works correctly for encoding, the form POST doesn't. I need
the following codes to get the right encoding for data coming from a form POST method:
> 		try{
> 			tmp = new String(str.getBytes("ISO-8859-1"), "UTF-8");
> 		}catch(Exception ex){}

How exactly are you obtaining "str" in the above ?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message