Recently engaged in the page. Refers to the pagination of nested pages, all kinds of mistakes, have done similar before, it is easy to forget, so in this record, I hope the development of you, but also helpful.
Simply say the difference between them:
<jsp:include page= "" > Parent page and the included page are compiled separately, translated into Servlets, and then spelled as an HTML page in the foreground. <% @include file= ""%> the parent page and the included page, after the code is merged, it is translated into a servlet and fed back to the foreground to form an HTML page.
<jsp:include/> Dynamic inclusion, which is not integrated with the current page, is equivalent to invoking a method that contains the interface and the included interface to generate two different class
<% @page include= ""%> static inclusions, incorporating the included pages and the current page into a servlet
Attention:
Do not let the include in the El tag, or although in the code can be linked to nested pages, but in the browser, is not displayed, there is no error message.
Some netizens also said that using
<jsp:include page= "/jsp15/back_manage/pageman.jsp" flush= "true"/ > To add flush= "true"
The book says:
Flush=true, the content of the current page output buffer is refreshed before the target resource is included;
Flush=false, the output buffer of the current page is not refreshed until the file is included.
After I verify, do not need to add is also the line!
You can also refer to this:
http://bbs.csdn.net/topics/330071695
http://bbs.csdn.net/topics/360228154
<% @include and Jsp:include