• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Ranch Hand
Posts: 59
  • 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
 
Ranch Hand
Posts: 8943
Firefox Browser Spring Java
  • 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]
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • 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
https://coderanch.com/t/351594/Servlets/java/passing-parameters-included-jsp-file
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic