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

    Details

    • Target Release:
    • Steps to Reproduce:
      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
    • Workaround:
      Workaround Exists
    • Workaround Description:
      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>
    • QE Test Coverage:
      +

      Description

      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>

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              flavia.rainone Flavia Rainone
              Reporter:
              aogburn Aaron Ogburn
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: