使用ajax处理中文乱码
作者:互联网
JSP页面中
ajax.open("post","${pageContext.request.contextPath}/manage/UserCheckServlet?user="+encodeURI(eu_user_id.value)+"&t="+Math.random());
Servlet中
String user = req.getParameter("user");
user = new String(user.getBytes("ISO8859-1"),"UTF-8");
标签:中文,String,contextPath,UserCheckServlet,乱码,ajax,user 来源: https://www.cnblogs.com/Listener-wy/p/13594068.html