This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "page directive" Watch "page directive" New topic
Author

page directive

Anonymous
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
Greenhorn

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: page directive
 
jQuery in Action, 3rd edition