What are the differences between JSP: Include, JSP: Forward and other jumps?

Source: Internet
Author: User

<JSP: Forward> transfer request information from a JSP file to another JSP file, and the rest of <JSP: Forward> will not be executed.
You can use <JSP: param> to pass parameters.

<JSP: Include> place the included files in JSP and execute them with others.

 

In JSP, there are two ways to jump to a page: 1. forward jump: <JSP: Forward page = "Jump page address"/> 2. response jump: response. sendredirect ("Jump page address"); the difference between the two jumps is as follows: 1. forward jump:. server jump, the address bar does not change; B. after the jump statement is executed, the system immediately jumps unconditionally.CodeNo longer executed (all resources must be released before the jump); C. the property set for the request can still be used on the page after the jump; D. use <JSP: Param name = "parameter name" value = "parameter value"/> to pass the parameter. 2. response jump:. client jump, address bar changed; B. jump after all code execution is complete; C. the request attribute of the previous page cannot be used for the redirected page; D. use address rewriting to pass Parameters (response. sendredirect ("url? Parameter Name = parameter value ")).

Related Article

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.