Hi, Tresa. Incase of <%@ include file=”dir/B.jsp”%> that is present in A.jsp, during translation phase(i.e, converting from .jsp to .java file) the JSP compiler goes to the 'dir' directive and finds the B.jsp, and place the file as it is in the A.jsp.(with <html><body>...</body></html>) Since B.jsp contains <jsp:include page=”C.jsp”/>, it will not be converted into .java file at this moment. Now the jsp compiler compiles A.java into .class file. Then it goes for execution, while executing, the container sees <jsp:include page="C.jsp" />(actually it is a dynmaic one), then the jsp compiler converts from .jsp to .java file, and then converts into .class file, and executes it, and the response object of it is added to the A.jsp's response object, and the response is sent to the client.
Incase of <jsp:include page=”dir/B.jsp”/> that is present in A.jsp, while the jsp compiler compiles A.jsp into A.java file, B.jsp's code will not be put into the A.java, it just addresses <jsp:include page="dir/B.jsp" />(since it is a dynamic one). During executing A.class, the container sees <jsp:include page="dir/B.jsp" />, then the job is handover to the jsp compiler,the jsp compiler goes to the 'dir' directory and sees the B.jsp's code and in the code it sees <%@ include file=”C.jsp” %>, since it is a static one, it addes the C.jsp's code(with <html><body>...</body></html>) and converts it into .java file, and compiles into .class file and starts executing, at last the response object is added to the A.jsp's response object and sent to the client.
The above process will varies from one implementor to the another.
Here the current JSP page and current JSP means, the the file or page that is under compiling or executing.