JAVA --- The difference between redirection and forwarding

Redirection features (redirect) :
1. The address bar changes
2. Redirection can access resources of other sites (servers)
3. Redirection is two requests. Cannot use request object to share data

The characteristics of forwarding (forward):
1. The path of the forwarding address bar remains unchanged
. 2. The forwarding can only access the resources under the current server.
3 The forwarding is a request. You can use the request object to share data


So generally there are shared data for forwarding, and no shared data for redirection.


                                         感谢收阅

Guess you like

Origin blog.csdn.net/Forest_2Cat/article/details/108105231