what is the use of include directive and how we can use it in JSP? shivani
Val Dra
Ranch Hand
Joined: Jan 26, 2001
Posts: 439
posted
0
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.
Val SCJP <BR>going for SCJD
Bharatesh H Kakamari
Ranch Hand
Joined: Nov 09, 2000
Posts: 198
posted
0
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