Re: problem related include directive & action

2006-05-22 Thread Mark Thomas
Harshal Joshi wrote:
> I want to know exact difference between include directive & include
> action.

The JSP spec is your friend.

http://java.sun.com/products/jsp/reference/api/index.html

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem related include directive & action

2006-05-22 Thread Harshal Joshi



 
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 
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
Include Directive content :: 
  <%@ include file="included.jsp" 
%>
Include Action content ::   

 
file 
included.jsp
<%@ page language="java" import="java.util.Date" 
%>
Date is ::<%= 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" 
%>
Today's Date is 
::<%= 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