struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Azuo Lee (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (WW-4050) AnnotationValidationInterceptor should consult UnknownHandler before throwing NoSuchMethodException
Date Thu, 18 Apr 2013 07:13:15 GMT

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

Azuo Lee updated WW-4050:
-------------------------

    Description: 
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&nbsp;&nbsp;*404* (Action "foo" not found)}}
{{GET /bar/list&nbsp;&nbsp;*200*}}
{{GET /bar/print&nbsp;*500* (Method "print" not found, *404* is expected instead of *500*)}}


  was:
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 /dog/list  200
GET /dog/print 500 (Method "print" not found, expect 404 instead of 500)


    
> 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
>
> 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&nbsp;&nbsp;*404* (Action "foo" not found)}}
> {{GET /bar/list&nbsp;&nbsp;*200*}}
> {{GET /bar/print&nbsp;*500* (Method "print" not found, *404* is expected instead
of *500*)}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message