You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2016/11/13 11:05:58 UTC
[jira] [Updated] (WW-4050) AnnotationValidationInterceptor should
consult UnknownHandler before throwing NoSuchMethodException
[ https://issues.apache.org/jira/browse/WW-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-4050:
------------------------------
Fix Version/s: (was: 2.5.x)
2.5.7
> AnnotationValidationInterceptor should consult UnknownHandler before throwing NoSuchMethodException
> ---------------------------------------------------------------------------------------------------
>
> Key: WW-4050
> URL: https://issues.apache.org/jira/browse/WW-4050
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.3.14
> Reporter: Azuo Lee
> Fix For: 2.5.7
>
>
> If a {{NoSuchMethodException}} is caught when invoking {{getActionMethod()}}, {{AnnotationValidationInterceptor}} should first give any configured {{UnknownHandler}} a shot, before throwing the exception directly, just as what {{DefaultActionInvocation.invokeAction()}} does.
> Any unknown {{Action}} or unknown {{Result}} is currently handled by {{Dispatcher.serviceAction()}}, and a *404* error code will be returned as expected. But an unknown {{Method}} will raise a *500* error, the only way to avoid this is to configure an {{UnknownHandler}}. Therefore, {{AnnotationValidationInterceptor}} won't inspect {{UnknownHandler}} at all...
> {{GET /foo/list *404* (Action "foo" not found)}}
> {{GET /bar/list *200*}}
> {{GET /bar/print *500* (Method "print" not found, *404* is expected instead of *500*)}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)