url传参数到后台中文乱码解决方案

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