Servlet 两种跳转方式

it2022-05-05  125

 

  response.sendRedirect , // 重定向,服务器端将uri返回到客户端,客户端再次发送请求。

 

  RequestDispatcher  rd  =  getServletContext().getRequestDispatcher("/login.jsp"); 

  rd.forward(request,response);  //跳转,直接从服务器端访问 uri

转载于:https://www.cnblogs.com/shouwangzhe-/p/3909327.html


最新回复(0)