Page redirection of spring (18) and form processing of spring (17)

First of all, the Maven dependency of this example can reuse the form processing of spring (17)

There is an important difference between redirection and forwarding: when forwarding is used, the JSP container will use an internal method to call the target page, the new page will continue to process the same request, and the browser will not know the process. In contrast, redirection means that the first page notifies the browser to send a new page request. Because when you use redirection, the URL displayed in the browser will become the URL of the new page, and when you use forwarding, the URL will remain unchanged. Redirection is slower than forwarding because the browser has to make a new request. At the same time, because the redirection method generates a new request, the objects in the request will not be used after a reset. The difference between forwarding and redirection is not to use the session scope just to transfer variables to the next page, which will increase the scope of variables for no reason. Forwarding may help you solve this problem.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>