<%@ include file="somePageOfText.ext" %>
"The directive tag instructs the
JSP compiler to merge contents of the included file into the JSP before creating the generated
servlet code. It is the equivalent to cutting and pasting the text from your include page right into your JSP. "
This includes file somePageOfText.ext in the page. Question is, does it get the content in the page before starting the execution of jsp page ? So no matter where include directive is in the jsp code, it will be executed first and content if the included page will be pasted at the top of the page and whatever is the output of the generated servlet code will be attached to this included file content. Is this correct ?
----------------------------------------------------------------------------
<jsp:include page="someJSP.jsp" />
This action directive, whenever encountered in the code, will execute this code and put the content in the original jsp page at the location where this include action is placed.
Does it mean that <jsp:include ...... /> can be placed anywhere in the jsp code ? I have seen this "include" action always at the beginning of the page.
The only difference between action and directive is that directive can be placed anywhere in the code but it will be executed first and its content will always be at the top of the page. It can include only static page. While in case of include action, it can include dynamic pages and its content will be placed at the location where its placed.
Please correct me whereevr I am wrong.