23-4.3 The difference between forwarding and redirection (remember)

             转发和重定向区别
  1. Forwarding is a request, redirection is a second request
  2. The forwarding path will not change, the redirected path will change
  3. Forwarding can only be forwarded to the internal resources of the project. Redirection can be redirected to the internal resources of the project or external resources of the project (eg: Baidu)
  4. Forwarding can be forwarded to resources under WEB-INF, and redirection cannot be redirected to resources under WEB-INF
  5. Store the data in the request, the forwarding is valid, and the redirection is invalid
  6. The forwarded path is written relative (without http, without ip, without project name), and the redirected path is written with absolute (with http, with ip, with project name)

Guess you like

Origin blog.csdn.net/weixin_aqing/article/details/112269029