Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ErrorPage Doubt??

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I'm having doubt on page 462 of HFSJ. They show jsp page which has <c:catch> tags and the also have a <%@ page errorPage....%>. When we use a c:catch, which is definitely going to catch the exception, then what is the use of the page directive at the top?? I can very well omit it. Am I right??
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone to confirm this please??
 
Manish Agarwal
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jothi,

What if you want to perform some action depending upon the exception type?
I mean we may have some situations where we want to just ignore the exception and continue the processing or perform different action for different exceptions. In this case you'll need <c:catch> errorPage page directive will not fulfill this requirement.
This is just my view.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manish,

I think that you did not quite understand what I asked. When you use a c:catch body, why is that you also need <%@ Page errorPage...>?? Are you getting what I'm trying to say?
 
Manish Agarwal
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jothi Shankar Kumar Sankararaj:
Manish,

When you use a c:catch body, why is that you also need <%@ Page errorPage...>??


Hello Jothi,

When you use c:catch body there is NO need to add page directive errorPage.
I have tried that.
Please let me know if I still doesn't understand your question.

Thanks
Manish
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic