One, the static contains the instruction <% @include file= "FileURL"%>
1, two JSP page <% @page contenttype= "TEXT/HTML;CHARSET=GBK"%> should be consistent
2, cannot pass the parameter to the contained JSP page through the FileURL, because this static inclusion is occurs during the conversion of the JSP page to the servlet, at this time the parameter is the server side set the dead parameter, completely did not pass the client, this parameter is meaningless, such as <%@ Include file= "Fileurl?user=admin"%>, and this will be an error.
3 . The included JSP pages share a request built-in object with the included JSP page.
For example, when the client accesses the containing page, the address bar is followed by a parameter, which is sent by the client and two pages can access this parameter. We can see that the passed arguments become member variables of the servlet through the two pages of the composite servlet.
4. The included JSP page and the included JSP page are preferably not duplicated HTML tags. Otherwise, coverage will occur.
Two, dynamic contains <jsp:include page= "a.jsp"/> and Static contains <% @include file= "FileURL"%> the Difference
1. dynamically contained elements are page, and there are two forms. Static inclusions are file, with only one form.
2. The generated file is different, the static inclusion is the two JSP files in one, a servlet and class file that contains the page name, the dynamically included two JSP files each generate their own servlet and class files.
3. method One: <jsp:include page= "a.jsp?param=123"/> When the JSP page is included can access the parameter.
4. two ways to pass the parameter:
<jsp:include page= "a.jsp" >
<jsp:param name= "" Value= "" >
<jsp:param name= "" Value= "" >
</jsp:include >
5. when the client accesses the containing page, the address bar is followed by a parameter, which is sent by the client, but the request object for the two pages is not the same because the 3 It has been said that the included page can pass parameters to the contained page, so the contained request object should contain more than equal to the number of parameters containing the page. So they each have their own request object. And the included JSP page can access the parameters that are uploaded to the containing page.
6. Dynamic inclusion is only loaded when it is executed, so it is called dynamic inclusion.
The difference between JSP static inclusions and dynamic inclusions