• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with include files  RSS feed

 
Peter Straw
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am including a menu bar with the following piece of code:
<%@ include file="menu.jsp" %>
This works fine, but if I make a change to the menu.jsp then the change does not show up when viewing the file that includes it.
How is it possible to do this please? (other then removing the include statement, 're-compiling' the .jsp and then putting the statement back in again! )
TIA
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use <jsp:include page="menu.jsp">
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter
Just to elaborate...
Pradeep is correct, use the include standard action. The standard action include is a run time include while the directive include is a compile time so changes made to include file wouldn't show up unless you recompiled the file doing the including.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!