• Post Reply Bookmark Topic Watch Topic
  • New Topic

Handling Exception Declaratively in WEB-INF Or JSP Errpr Page  RSS feed

 
rastin purr
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Guys,
What is the difference between handling exception declaratively in the web.xml descriptor and including a jsp error page tag in the jsp? Which are prefered in what situation? Since the declartive approach could catch exception from both servlets and jsp, why is there a need for the jsp error page tag? Are they redundant? Can some one explain further please? Preferably with examples. Thanks
regards
Rastin
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The nice thing about the JSP declared error page is that you get the exception variable plus the request and session (I think) so you can have a report that is exactly matched to what you are trying to do in the JSP.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!