• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

SkipPageException - Doubt

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic