doGet()方法改为
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
this.doPost(request, response);
}
把PrintWriter out = response.getWriter();
加到doPost方法中response.setContentType("text/html;charset=utf-8");语句的下面
doPost()方法应该没有什么问题,doGet()方法可能才有点问题,既然调用了doPost()为什么还对response进行操作。
doGet()才有问题呢
把后面两句去掉