我的页面跳转输出还是乱码,已经在使用格式转换了,也没有报错,有谁知道是哪里有问题吗
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String piccode = (String)request.getSession().getAttribute("piccode");
//获取用户输入的验证码
String checkcode = request.getParameter("checkcode");
//设置输出流,从而获得输出
PrintWriter out = response.getWriter();
checkcode = checkcode.toUpperCase();
response.setContentType("text/html;charset=utf8");
if(checkcode.equals(piccode)){
out.println("验证码输入成功!!");
}else{
out.println("验证码输入有误,请重试!!!!!");
}
out.flush();
out.close();
}
}