Difference between include action and include directive

1. When the include instruction is imported into the page, it will be completely integrated with the original jsp code to generate the same Servlet; and the include action will be imported into the page using the include
method , so the include instruction is executing It does not need to be compiled and the execution speed is fast, while the include action needs to be compiled when it is executed, and the execution speed is slow;
    2. When the include command is imported into the page, compiling the jsp will work, and the include action will lose its effect when it is compiled to the page, just The <boby> tag in the original jsp code generates the
content of the page, so the param action can be used to pass parameters for the imported page;
    3. From the perspective of the jsp position, the include command specifies the included file through the file attribute , is placed at the top of the jsp code, the include action is placed in the <boby> tag to specify the included file, and
the page attribute can be used, so it supports jsp expressions, while file does not support any expressions

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324974343&siteId=291194637