Continued Java time period ---- sevlet jump

Source: Internet
Author: User

The difference between the requestdispatcher. Forward () method and httpservletresponse. sendredirect () method is:

Requestdispatcher. Forward () is only the redirection of control in the container. The redirection address is not displayed in the address bar of the client browser;

Httpservletresponse. sendredirect () is a complete jump. the browser will get the jump address and resend the request link. In this way, the link address after the jump is displayed in the address bar of the browser.

Therefore, the former is more efficient. When the former can meet the needs, try to use the request dispatcher. Forward () method, and this will also help to hide the actual link.

 

To maintain some request information on the current page, you need to save the request object with hidden input.

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.