出现的情况:
表单FORM、POST、GET、超链接、sendRedirect()
解决方法:
如果是POST使用
HttpRequest.setCharacterEncoding("utf-8");
如果是GET使用
new String(
req.getParameter("username")
.getBytes("iso-8859-1"),"utf-8");