I wanted to post a trivial doubt on same topic jsp:include Vs @ include.
A.jsp
C.jsp
B.jsp
Now As HFSJ mentions that @ include does everything @ translation time i.e. it copies code of B.jsp into A.jsp and then created instance of
servlet A. As such it is more often used for pages which are not updated regularly.
<jsp:include> on the other hand includes a runtime call for B.jsp inside A.jsp and with every request accesses output of B.jsp @runtime.
But in this case how would the difference between jsp:include and @include play out for two subsequent requests to A.jsp and C.jsp??
As per my understanding display would be different for each subsequent request to A.jsp or C.jsp.
Display @ FIRST Request Call to A.jsp ====>
The current date and time are
Feb 27, 2009 21:38:40
Display @ SECOND Request Call to A.jsp ====>
The current date and time are
Feb 27, 2009 21:40:40
Display @ FIRST Request Call to C.jsp ====>
The current date and time are
Feb 27, 2009 21:42:40
Display @ SECOND Request Call to C.jsp ====>
The current date and time are
Feb 27, 2009 21:44:40
So is the difference only related to static HTML, images etc. ???