1.window.location.href = url+"&name=" + encodeURI(encodeURI(name)) ;
name是中文,客户端编码两次,服务器端只需要解码一次
name = java.net.URLDecoder.decode(name, "UTF-8");
2.window.location.href = url+"&name=" + encodeURI(name) ;
name是中文,客户端编码一次,服务器端取值方法
String name=new String(request.getParameter("name").getBytes("ISO-8859-1"),"UTF-8");
3.<s:param name="name" alue="@java.net.URLEncoder@encode(name,'UTF-8')"/>