• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

c:catch

 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

On p361 of Charles Lyons' book it says that nested actions inside <c:catch> will have their exceptions wrapped in a page scoped attribute. Does that include MY own custom actions nested inside <c:catch>? Or just those actions from the JSTL library?

(I know, I could test this out myself, but that takes 20 minutes and posting the question where the author hangs out takes 2, and I'm getting close to the test date.)

Thanks!
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know, I could test this out myself, but that takes 20 minutes and posting the question where the author hangs out takes 2, and I'm getting close to the test date.
I take it that's my cue to chip in then

Yep, it should catch every exception. Think of it as a tag handler implemented like:In fact, such tags are more likely to be classic tags and to implement the javax.servlet.jsp.tagext.TryCatchFinally interface to get additional hooks for exceptions. More recent containers implement JSTL inline in the translated JSP for efficiency, so in those cases <c:catch> just gets converted a try/catch block in the JSP source code. But you don't need to know any of that for the exam, or life in general really
[ December 22, 2008: Message edited by: Charles Lyons ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic