Hi,
 
I want to know exact difference between include directive & include action. As I have read from some sites & some books
that one diff. is Include directive is take place at translation (compile) time while action takes place as runtime.
So, if you make change in included file, that change will only reflect by include action <jsp:action page="..."/>
But I did one example which show me changes in both  include directive as well as include action.
I did testing on tomcat 4.1 & tomcat 5.0.28.  So can any one tell me exact diff. b/w include directive & action.
 
As all r saying abt changes don't reflect by include directive then why I see changes in my example?
 
Plz clarify if I am wrong at some place... Thanks for your help...
 
Example...
 
file checkInclude.jsp
<b>Include Directive content :: </b>  <%@ include file="included.jsp" %>
<br><br>
<b>Include Action content :: </b>  <jsp:include page="included.jsp" />
 
file included.jsp
<%@ page language="java" import="java.util.Date" %>
<b>Date is ::</b>
<%= new Date()%>
 
Result is ::
Include Directive content :: Date is :: Mon May 22 13:14:40 GMT+05:30 2006

Include Action content :: Date is :: Mon May 22 13:14:40 GMT+05:30 2006
 
Update included.jsp
<%@ page language="java" import="java.util.Date" %>
<b>Today's Date is ::</b>
<%= new Date()%>
 
Result after update ::
Include Directive content :: Today's Date is :: Mon May 22 13:17:04 GMT+05:30 2006

Include Action content :: Today's Date is :: Mon May 22 13:17:05 GMT+05:30 2006
 

Thanks & Regards,

Harshal Joshi

Software Engineer

 

Reply via email to