wood burning stoves
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes page directive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "page directive" Watch "page directive" New topic

page directive

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Can we have more than 1 page directive in a page.
How does it work if you include pages with page directive.
Sangeetha Selvaraj

Joined: Jan 12, 2004
Posts: 17
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: page directive
jQuery in Action, 3rd edition