Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

include directive

 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the use of include directive and how we can use it in JSP?
shivani
 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • 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.
 
Bharatesh H Kakamari
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic