The difference between a JSP static include and a dynamic include

Source: Internet
Author: User

Static include is a directive element. The syntax format for the INCLUDE directive:<%@ include file= "filename"%>. The role of the include directive is to statically include a file in a JSP page, while the JSP resolves the contained file content
The meaning of static inclusions. The 2 JSP pages involved are translated into a servlet, the. java file, which is then compiled into a. class file for external display. Summary: First include, after translation, finally compiled.

Dynamic include is <jsp:include file= "filename" flush= "true" >.<jsp:include> The 2 JSP pages involved in the tag are translated into 2 servlets, and the contents of the 2 Servlets are merged at execution time. Summary: compile first, then include.

Whether it's a <jsp:include> tag or an include directive, they all merge two JSP page contents, so the two pages don't have duplicate HTML global schema tags, otherwise the content output to the client will be a cluttered HTML document.

The difference between a JSP static include and a dynamic include

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.