• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

include directive

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the use of include directive and how we can use it in JSP?
shivani
 
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am just begingin jsp and i read that this derictive is used to include other pages into this page. So you can use that pages functionality as well.
 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you know C language then the include directive is similar to #include directive there.
include directive is used to include a jsp file in the current jsp file. The reason why this could be done is to separate presentation layer into various jsp pages so that if a change is required for one page, the entire presentation layer need not change.
There are two ways of including a file : a) the include directive and another with <jsp:include> action. The latter is used when the design requires the inclusion of the file as run-time. For eg during run-time another jsp file gets generated and this is included at run-time.
HTH
 
reply
    Bookmark Topic Watch Topic
  • New Topic