The difference between the two include methods. (Why go wrong, see for yourself.)

Source: Internet
Author: User
Include Q:
Why <jsp:include page= "Aa.txt"/> Not to be displayed? But you can use <%@ include file= "Aa.txt"%>?

For:
The two include are contained in a different way.
The former is the inclusion of HTML after the AA.TXT is processed through the server.
The latter is the first to include the file in, and then processing.
Therefore, if you use the former, you must ensure that the JSP statements in the file are correct. All variable definitions are independent.
If this is the latter, you can use external variables defined in AA.TXT before the include it.
There is a difference between the two, that is, the former is dynamically updated, that is to say AA.TXT if a variable occurs, all files containing it will change. And the latter, only to be able to see all the AA.TXT files first changed, recompile can be seen the new effect.

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.