首先在页面传参的地方要进行两次编码
location.href="/test?id="+id+"&name="+encodeURI(encodeURI(name));
然后后台的action中还要进行一次解码
String str = URLDecoder.decode(name, "UTF-8");
首先在页面传参的地方要进行两次编码
location.href="/test?id="+id+"&name="+encodeURI(encodeURI(name));
然后后台的action中还要进行一次解码
String str = URLDecoder.decode(name, "UTF-8");