Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1762

Error page for custom exception-type is not is not displayed in jsp development mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.31.Final, 2.1.4.Final
    • 2.1.3.Final
    • Servlet
    • None
    • 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 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>

      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>

       

        1. ut1762.war
          2 kB
          Aaron Ogburn

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

                Created:
                Updated:
                Resolved: