JspTag: Catching JspException to go to ErrorPage???

Discussions

Web tier: servlets, JSP, Web frameworks: JspTag: Catching JspException to go to ErrorPage???

  1. I have a JSP Tag. It throws JspException. How could I catch it and redirect that to a nice page instead of white page with Stacktrace showing up in the browser?

    Thank you
  2. Simply declare a <%@page errorPage="someErrorPage.jsp"%> directive where the particular tag is being used.
  3. Hi Samuel! I created a custom tag for dynamically displaying a table of informaion in jsp. tag works fine. but when exception occured in custom tag on console i am getting the JspExcetion message and rest of the screen is displayed properly. can any one help me in redirectly the same error to error.jsp. i tried your solution but that doesnt solve my problem Thanks in advance