转发 两种方法:
1,request.getRequestDispatcher(getServletContext().getContextPath() + "/path").forward(request, response);//request是HttpServletRequest的对象
2,this.getServletContext().getRequestDispatcher(getServletContext().getContextPath() + "/path").forward(request, response);
重定向:
1,response.sendRedirect(getServletContext().getContextPath() + "/path"); //response是HttpServletResponse的对象