File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

should I use "#include" or "jsp:include" ?

 
mike zhang
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to include a header file in my jsp file. I want to make sure that this header file's content can be changed at any time and my jsp page should automatically load the up-to-date version without need to do anything (like restart server, remove .class file, etc). Should <#include file = "">
or <jsp:include page = ""/> suit this purpose ?
I myself assume maybe I should use the <jsp:include /> instead of the other one. Is that true ?
Thanks,
Mike
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think u were talking about <include file=" .." and not <#include ..>
U can <jsp:include for ur case so any changes made to the file is reflected immediately.
[ April 29, 2002: Message edited by: pradeep bhat ][/QB]
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSP options for include are:

directive:
<%@ include page="foo" %>

action:
<jsp:include page="foo" flush="true" />

Check this (very old) link for some more details
http://www.coderanch.com/t/351594/Servlets/java/passing-parameters-included-jsp-file
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic