Can we have more than 1 page directive in a page. How does it work if you include pages with page directive.
posted 12 years ago
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.