Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on including file by directive

 
Jingh Yi
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Shiva! Tomcat is too smart for me...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic