struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Huber (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4605) Refactor MessageStoreInterceptor and use PreResultListener to store messages
Date Mon, 15 Feb 2016 16:58:18 GMT

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

Greg Huber commented on WW-4605:
--------------------------------

I extend MethodFilterInterceptor as not all my actions have mobile screens eg cancel, so there
is quite a lot of filtering.  Why I ended up with I PreResultListener(), I guess it was a
good (or bad) day coding. ;)

Does it use the result in the code anyway?  If I swap them back it still works with no npe.
 
{code:java}
if (preResultListeners != null) {
                    LOG.trace("Executing PreResultListeners for result [{}]", result);

                    for (Object preResultListener : preResultListeners) {
                        PreResultListener listener = (PreResultListener) preResultListener;

                        String _profileKey = "preResultListener: ";
                        try {
                            UtilTimerStack.push(_profileKey);
                            listener.beforeResult(this, resultCode);
                        }
                        finally {
                            UtilTimerStack.pop(_profileKey);
                        }
                    }
                }
{code}

> Refactor MessageStoreInterceptor and use PreResultListener to store messages
> ----------------------------------------------------------------------------
>
>                 Key: WW-4605
>                 URL: https://issues.apache.org/jira/browse/WW-4605
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>    Affects Versions: 2.3.24
>            Reporter: Lukasz Lenart
>             Fix For: 2.3.25, 2.5
>
>
> See WW-4600 as this issue is similar, when response was already comitted (redirect was
send, JSP was rendered), logic in {{after}} method won't work as it isn't possible to modify
session when response was comitted.



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

Mime
View raw message