wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question on including file by directive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Question on including file by directive" Watch "Question on including file by directive" New topic
Author

Question on including file by directive

Jingh Yi
Ranch Hand

Joined: Mar 23, 2005
Posts: 90
My view.jsp:

<html>
<body>
AAAAAAAAAA
<%@ include file="footer.html" %>
</body>
</html>

Then, I changed content of footer.html, then I access the view.jsp again. How come view.jsp now shows new content of footer.html?

I'm confused. Since I didn't change view.jsp and directive include happens at translation time, the content of view.jsp should not be changed. Right?

Thanks,
Jenny
shiva viswanathan
Ranch Hand

Joined: Aug 12, 2004
Posts: 152
Hi Jenny

My guess is you are using one of the popular web servers like tomcat , weblogic , websphere etc

These are termed as "intelligent servers"(as termed in HFSJ)
which can detect when the file has been changed even when you make use of include directive

Hence for most modern web servers include directive works same as jsp irective even though it is not guaranteed by the spec

Catch You Later
Shiva
Jingh Yi
Ranch Hand

Joined: Mar 23, 2005
Posts: 90
Thanks, Shiva! Tomcat is too smart for me...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on including file by directive
 
Similar Threads
Question 22 on HFSJ Mock :Confusing Text
Doubt in Final Mock Exam:HFSJ
HFSJ Mock Exam
Doubt on HFSJ Final Mock Exam #22
HFSJ final mock exam question