关于大家说的显示中文的问题我是这样解决的,改成doPost请求,前台两次编码转换
var url = "search?keyword="+encodeURI(encodeURI(content.value));
后台也需要转换一次
// request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
String keyword = request.getParameter("keyword");
keyword =URLDecoder.decode(keyword, "UTF-8");
var url = "search?keyword="+encodeURI(encodeURI(content.value));
后台也需要转换一次
// request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
String keyword = request.getParameter("keyword");
keyword =URLDecoder.decode(keyword, "UTF-8");
2016-12-13
下面这位他的包有问题,看这位的。分享给需要的同志们,嘿嘿。链接:http://pan.baidu.com/s/1boFIrbL 密码:q9vm
2016-11-30