• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
https://coderanch.com/t/351594/Servlets/java/passing-parameters-included-jsp-file
 
reply
    Bookmark Topic Watch Topic
  • New Topic