struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4618) MessageStorePreResultListener doesn't store messages for 3rd-party RedirectResult subclasses
Date Fri, 13 May 2016 05:07:12 GMT

    [ https://issues.apache.org/jira/browse/WW-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15282405#comment-15282405
] 

ASF subversion and git services commented on WW-4618:
-----------------------------------------------------

Commit dbf744f54bbc7d8cebac1a0a8d52b15065a2c484 in struts's branch refs/heads/master from
[~lukaszlenart]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=dbf744f ]

WW-4618 Supports custom redirect types which base on ServletRedirectResult


> MessageStorePreResultListener doesn't store messages for 3rd-party RedirectResult subclasses

> ---------------------------------------------------------------------------------------------
>
>                 Key: WW-4618
>                 URL: https://issues.apache.org/jira/browse/WW-4618
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.3.28
>            Reporter: Jim deVos
>             Fix For: 2.3.29, 2.5.1
>
>
> My team uses a custom subclass of ServletRedirectResult, e.g. "org.tdar.struts.ServletRedirectResult".
After updating to 2.3.8 our messages no longer survive a redirect.  I believe the problem
lies with this section of [MessageStorePreResultListener|https://git-wip-us.apache.org/repos/asf?p=struts.git;a=blob;f=core/src/main/java/org/apache/struts2/interceptor/MessageStorePreResultListener.java;h=60fcffe2116f16503ba6540ff9f69b25dac173f1;hb=8852618]:

> {code}
> if (resultConfig != null) {
>     isRedirect = ServletRedirectResult.class.getName().equals(resultConfig.getClassName())
>             || ServletActionRedirectResult.class.getName().equals(resultConfig.getClassName());
> }
> {code}
> Per the discussion in WW-4605,  the following change could likely resolve the issue:
> {code}
> if (resultConfig != null) {
>     isRedirect = ServletRedirectResult.class.isAssignableFrom(Class.forName(resultConfig.getClassName()));
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message