servlet和jsp请求转发和重定向
1、请求转发
request.getRequestDispatcher("other.jsp").forward(request, response);
2、请求重定向
response.sendRedirect("other.jsp");
response.sendRedirect("http://");
注:重定向可以到本站点意外的地址
1、请求转发
request.getRequestDispatcher("other.jsp").forward(request, response);
2、请求重定向
response.sendRedirect("other.jsp");
response.sendRedirect("http://");
注:重定向可以到本站点意外的地址