Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-20008

[GSS](7.3.z) UNDERTOW-1762 - Error page for custom exception-type is not displayed in jsp development mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.3.3.CR1, 7.3.3.GA
    • 7.3.2.CR1
    • Undertow
    • None
    • +
    • Workaround Exists
    • Hide

      Don't use development mode or use a generic Throwable for the error-page exception type if possible:

      <exception-type>java.lang.Throwable</exception-type> 
      Show
      Don't use development mode or use a generic Throwable for the error-page exception type if possible: <exception-type>java.lang.Throwable</exception-type>
    • Hide

      -Set <jsp-config development="true"/> in undertow

      -Deploy ut1762.war

      -Request /ut1762

      Show
      -Set <jsp-config development="true"/> in undertow -Deploy ut1762.war -Request /ut1762

      With the jsp-config set for development mode, org.apache.jasper.servlet.JspServletWrapper wraps the ServletException with a JasperException. io.undertow.servlet.core.ErrorPages.getErrorLocation then does not check the original cause of that JasperException, so it won't find the error page for the original exception type. So then a config like this cannot work for a custom exception-type in development mode:

       <error-page>
       <exception-type>com.redhat.exception.CustomException</exception-type>
       <location>/error.jsp</location>
       </error-page>

            flaviarnn Flavia Rainone
            rhn-support-aogburn Aaron Ogburn
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: