在servlet里获取参数之前,设置UTF8编码,
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
response.setContentType("text/html;charset=utf-8");
并且表单提交使用post方法,method=“post”
在servlet里获取参数之前,设置UTF8编码,
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
response.setContentType("text/html;charset=utf-8");
并且表单提交使用post方法,method=“post”
转载于:https://my.oschina.net/ChiLin/blog/637717