Forums Register Login

SkipPageException - Doubt

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
I will suppress my every urge. But not this shameless plug:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 719 times.
Similar Threads
include - directive and action
SkipPageException one more problem
current JSP page/file and included resources
Unable to include html file in jsp page using WebSphere
JSP Error with multiple file includes
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:19:04.