As we all know, there are 2 kinds of tags in JSP to contain other JSP or file
1. The include directive is actually Java code
<%@ include file= "xxx.jsp"%>
2, JSP action tag, you can also take parameters
<jsp:include page= "xxx.jsp" > <jsp:param name= "title" value= "V"/></jsp:include>
Now with my understanding of the simple next two kinds of difference:
1, include directive is the JSP in the compilation phase, all the pages in the page with the instructions included in the compilation and synthesis of an HTML page display, the generated class has only one
2, the JSP tag is compiled separately contains all the JSP, the resulting HTML is composited together, the generated class has multiple
It can be concluded that the use of directives contains multiple JSPs, each JSP can not define a variable of the same name, because there will be conflicting names, and the use of tags do not have this problem
JSP 2 types of include tag differences