jsp传参到action中乱码问题
假设限定只能通过iframe的src属性进行刷新。
这是jsp页面中,将获取的参数进行编码
var resName=encodeURI($("#resName").val());
var resDesc=encodeURI($("#resDesc").val());
action通过这个进行转换
String resName =new String(resName.getBytes("ISO-8859-1"),"UTF-8");
String resDesc = new String(resDesc.getBytes("ISO-8859-1"),"UTF-8");
问题是我本机的传到action中参数不会出现中文乱码,但是换台机器就会出现乱码问题。
求助。。。