struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (WW-3341) Dispatcher catches Exceptions silently since 2.1.1
Date Sun, 04 Dec 2011 11:19:40 GMT

     [ https://issues.apache.org/jira/browse/WW-3341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lukasz Lenart updated WW-3341:
------------------------------

    Fix Version/s: Future
    
> Dispatcher catches Exceptions silently since 2.1.1
> --------------------------------------------------
>
>                 Key: WW-3341
>                 URL: https://issues.apache.org/jira/browse/WW-3341
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.1.8
>            Reporter: Nicolas Berthet
>            Priority: Critical
>             Fix For: Future
>
>
> Trying to migrate from 2.0.x to 2.1.8.1, I noticed that the exception handling from the
Dispatcher changed.
> Before :
> The dispatcher threw a ServletException and it was propagated through the stack
> Since 2.1.1 :
> The dispatcher catch all Exceptions and call sendError
> The problem is that the exception will not go up through the stack as it was the case
before, so nobody in the stack (j2ee filters) will notice this exception (unless checking
requests attributes, which is not a good way).
> If you use a javax.servlet.Filter for things such as open-session-in-view, you will not
notice the exception, and maybe fail to rollback your current transaction, same for exception
tracing filters, etc...
> It is a severe non-backward-compatible change, it was not mentionned in any of the changelogs.
It seems it has introduced by revision 602665, seems to be related to the fix for WW-218.
> From Dispatcher.serviceAction javadoc...
> "All other errors are reported by throwing a ServletException."
> The exception handling has to be clarified, I think propagating a ServletException is
more correct as it relies on the container and allow filters to take it into account. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message