File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes SkipPageException - Doubt 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 "SkipPageException - Doubt" Watch "SkipPageException - Doubt" New topic
Author

SkipPageException - Doubt

Manikandan Jayaraman
Ranch Hand

Joined: Sep 15, 2004
Posts: 230
There is a code snippet given to demonstrate SkipPageException in HFSJ, page 515. I have a dount on that.

I have answered it right as shown in the page 516, but I thought the behavior of SkipPageException might depend on whether jsp:include is used (or) include directive.

I mean ...

jsp:include results in a dynamic content generation and separate servlet for the included file (page B) and thus exception in that page B (_jsp.java) will end there itself and will not affect the parent jsp (page A) i.e the _jsp.java file.

Where as, <%@ include ... results in a single servlet at the translation time and thus any SkipPageException thrown in the pageB will stop the rest of contents in page A from being displayed.

Am I right here ? Can anyone give me a valid answer?

I am trying to replicate this in code but it will be fine, if someone can answer in between.

Regards,
Mani


Regards,<br />Mani<br />SCJP 1.4 (95%)<br />SCWCD 1.4 (94%)
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi,

Where as, <%@ include ... results in a single servlet at the translation time and thus any SkipPageException thrown in the pageB will stop the rest of contents in page A from being displayed.


I think you are right. in case of ibclude directive, there is no page B. The content of B is copied into page A. So the SkipPageException will throw from PageA not from page B, as the page B is not running seperately.

Thanks


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
Steven Colley
Ranch Hand

Joined: Feb 18, 2005
Posts: 290
right, i agree too.

The "page B" is just a fragment of code wich is included by page A. Therefore,"page a" is the only one (and real) page. (for container).

cya


SCJP | SCWCD | SCBCD | SCWSD 5 | SCEA (I) 1.4 | SCEA 5 | IBM SOA 669
 
 
subject: SkipPageException - Doubt
 
Similar Threads
current JSP page/file and included resources
JSP Error with multiple file includes
SkipPageException one more problem
Unable to include html file in jsp page using WebSphere
include - directive and action