已采纳回答 / JonSay
显示中文的问题我是这样解决的,改成doPost请求,前台两次编码转换var url = "search?keyword="+encodeURI(encodeURI(content.value));后台也需要转换一次// request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
String keyword = request.getParameter("keyword");
keyword =...
2016-11-23
输入中文乱码的问题解决:在后台
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
语句后面加上:
keyword =new String(keyword.getBytes("ISO-8859-1"),"utf-8");
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
语句后面加上:
keyword =new String(keyword.getBytes("ISO-8859-1"),"utf-8");
2016-11-15
http://share.weiyun.com/0a1c0ea1efdcda60552e2060074aa15c 没有密码,在老师基础上改的。只有一个index.html。有问题可以问我。
2016-11-15
最新回答 / Q小白熊
一般情况下,是你的search.jsp写错。var contents = document.getElementById("keyword");var url = "search?keyword=" + escape(contents.value);注意escape()括号里的是contents.value
2016-11-14