tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vwu98...@lycos.com
Subject Encoding Issue on POST
Date Sat, 01 Jan 2011 05:35:57 GMT
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">
* Set URIEncoding="UTF-8" on your <Connector> in server.xml
* An encoding filter for utf-8. 
  
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){}

Can anyone tell me what possible is wrong? 

The project is built with Spring and there are other two filters in addition of the encoding
filter.

Thanks and happy new year.

- v

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message