get后传中文参数时有试过在windon上是没问题的,但在Linux就有问题,
原本就进行了string 的编码转换ruleName = new String(ruleName.getBytes("iso-8859-1"),"utf-8");
但这都没用,
现在的处理是:
在页面:
encodeURI(encodeURI(name))
var url="attemper/queryAttemperGames?modelId="+id+"&modelName="+encodeURI(encodeURI(name));
var url="attemper/queryResultBymodelId?gameId="+id+"&ruleName="+encodeURI(encodeURI(name))+"&AttempTime="+time;
在后台:
String modelName = URLDecoder.decode(request.getParameter("modelName"),"UTF-8");
String ruleName = URLDecoder.decode(request.getParameter("ruleName"),"UTF-8");
然后就OK了