Re-understanding redirects, using redirects to prevent users from repeating the form (also on SPRINGMVC redirection)

Source: Internet
Author: User

I use the SPRINGMVC framework for some time, but have been not clear when should be forwarded, when should be redirected. There may be too many things to forward so that you forget to redirect.

When a user submits a POST request, refreshing the page causes the data to be submitted again, which is often said to repeat the submission. On-line access to the relevant information, found that the use of redirection can effectively prevent the duplication of data submission.

Redirect that is, after the client sends a request to the server, the service side requests the request in accordance with the code specified in the program request again, in the development of SPRINGMVC, the return of a redirected view only need to precede the view name with "Redirect:" prefix, Of course you must provide the redirected view access path so that the request path cannot be found after redirection.

Re-understanding redirects, using redirects to prevent users from repeating the form (also on SPRINGMVC redirection)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.