response.sendRedirect("index.jsp");//外部跳转
this.getServletContext().getRequestDispatcher("/2.jsp").forward(request, response);
//内部跳转,可传参
response.sendRedirect("index.jsp");//外部跳转
this.getServletContext().getRequestDispatcher("/2.jsp").forward(request, response);
//内部跳转,可传参