• Post Reply Bookmark Topic Watch Topic
  • New Topic

try catch & errorpage  RSS feed

 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
In my JSP page, we are told to write some codes within try-catch block so as to catch the errors, will the ErrorPage directive still work.
What I mean is, in case of error will the page be still re-directed to the page specified in <%@ page errorPage="Error.jsp"%>
Hope I am clear.
TIA
MB
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Malhar,
If the error is catched within the JSP, the error page will NOT be redirected.
The redirection occurs only when there are unhandled (uncaught) exceptions thrown from the JSP, and the JSP container will throw these exceptions to the error page that specified in the page directive.
Nick.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!