You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/04/22 13:57:14 UTC

DO NOT REPLY [Bug 51106] New: Error page handling serves most general exeptions first

https://issues.apache.org/bugzilla/show_bug.cgi?id=51106

           Summary: Error page handling serves most general exeptions
                    first
           Product: Tomcat 7
           Version: 7.0.11
          Platform: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: the4yeast@gmail.com


Apache Tomcat v7.0.11-x64
Catalina
PC/Windows 7 Enterprise x64
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

How to reproduce the problem?

  <error-page>
    <exception-type>my.MyException</exception-type> 
    <location>/exceptions/my_exception.jsp</location> 
  </error-page>

  <error-page>
      <exception-type>java.lang.Exception</exception-type>
      <location>/exceptions/all.jsp</location>
  </error-page>

and then throw new ServletException(new MyException("msg"))

the code in StandardHostValve first tries to find the error page for the
wrapping exception, then for the cause - therefore MyException is never handled
in the right place.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 51106] Error page handling serves most general exeptions first

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51106

--- Comment #3 from the4yeast <th...@gmail.com> 2011-05-04 16:41:20 UTC ---
Ok, agreed. After careful investigate of the spec, I need to agree with that.
However, that's just illogical to me.
My bad.
Solved it otherwise anyway.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 51106] Error page handling serves most general exeptions first

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51106

--- Comment #1 from Karl San Gabriel <ka...@gmail.com> 2011-04-27 12:54:03 EDT ---
Created an attachment (id=26937)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26937)
Proposed fix bug 51106

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 51106] Error page handling serves most general exeptions first

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51106

Karl San Gabriel <ka...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |karl.sangabriel@gmail.com
         OS/Version|                            |All

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 51106] Error page handling serves most general exeptions first

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51106

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Mark Thomas <ma...@apache.org> 2011-05-04 11:05:55 UTC ---
The Servlet spec (section 10.9.2) requires the current behaviour.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org