jap: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>//都改为utf-8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">//utf-8 tomcate: 方法1: <Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/> 修改tomcate配置。该方法直接将编码修改为Utf-8. 方法2: <Connector useBodyEncodingForURI="true" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/> 修改tomcate配置。该方法是页面传过来什么编码。tomcate就接受什么编码。如果需要转utf-8.就做后台处理。 controller: String value = URLDecoder.decode(value, "UTF-8");
原文:http://my.oschina.net/u/1444624/blog/292275