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