Differences between dynamic and static include in JSP

Source: Internet
Author: User

Dynamic include

Usage: <JSP: Include page = "supported ded. jsp" Flush = "true"/>

Note: It always checks the changes in the contained files. It is suitable for inclusion of dynamic pages and can contain parameters. It can be compiled before processing.

Cause: 1. The static include result is to introduce other JSPs into the current JSP. The two are integrated.

2. Static include is simply a sharing method for writing code out. All variables can be shared with the main file of include. The two are highly tightly integrated and cannot conflict with the same name of the variable. the page settings can also borrow the main file.

 

Static include

Usage: <% @ include file = "included.htm" %>

Note: This function is implemented by using the include pseudo code. It does not check the changes in the contained files. It is applicable to static pages that directly include the content before post-processing.

Cause: 1. The dynamic include structure is independent of the two and will not be merged until the output is completed (you can see the Java file generated by JSP ).

2. The dynamic include JSP file is highly independent. It is a separate JSP file and must be created on its own for the objects and page settings to be used. Of course, fortunately, it is consistent with the request range of the page that includes it.

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.