• 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

page directive

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can we have more than 1 page directive in a page.
How does it work if you include pages with page directive.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shan,
U can use page directives to import classes, create custom error pages and also include pages..to include the pages at complile time u have to use the include directive
<%@ include file="path of the file u want to include" %>
here the code becomes part of the generated servlet so any changes to the jsp are reflected only when modified and recompiled.
to include a file at runtime u have to use the include action
<jsp:include page="path of the file u want to include" flush="true" />
here the included file never becomes part of the generated servlet(for the JSp) so any change to the included file is displayed in the jsp the next time the page is requested..
hope this helps, and i think there can be more than one page directive, iam not sure tho...hopefully some one will clear that up for both of us.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic