Hi,
I understand how
jsp:include and include directive work differently. I wonder what is the real difference.
include directive happens at translation time and jsp:include happens at run-time. Consider the following.
Say, I have A.jsp includes B.jsp using jsp:include. When a request comes in for A.jsp, the container creates and instantiates
servlets for both A.jsp and B.jsp. Then, response from A.jsp is combined with response from B.jsp.
Now I change B.jsp, the only guaranteed way by SPEC is to redploy B.jsp. So I redeploy B.jsp. After that, jsp:include is guranteed to reflect the change but include directive may not (unless I have a container that detects it)
Is this right?
I would further say, if I have A.jsp and B.jsp in the same web app, there is no difference in jsp:include and include directive, because when I redeploy B, I am redploying the web app, which includes A.jsp.
Does that sound right?
Thanks.
Yan