Return-Path: X-Original-To: apmail-struts-dev-archive@www.apache.org Delivered-To: apmail-struts-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1FD841894E for ; Fri, 18 Mar 2016 15:38:51 +0000 (UTC) Received: (qmail 11333 invoked by uid 500); 18 Mar 2016 15:38:50 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 11292 invoked by uid 500); 18 Mar 2016 15:38:50 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 11280 invoked by uid 99); 18 Mar 2016 15:38:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Mar 2016 15:38:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 37DF11A108C for ; Fri, 18 Mar 2016 15:38:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.429 X-Spam-Level: * X-Spam-Status: No, score=1.429 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id QJYxRpCeFaFx for ; Fri, 18 Mar 2016 15:38:48 +0000 (UTC) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id CF5745F22F for ; Fri, 18 Mar 2016 15:38:47 +0000 (UTC) Received: by mail-lb0-f181.google.com with SMTP id bc4so91183409lbc.2 for ; Fri, 18 Mar 2016 08:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=XaSdUc1XbvNixtddnys/F0BSKvOXVcs9aEF7o2exrtM=; b=pWVjFeimcVX82PfaZo3YrlmKx1v7DWYX6AL2B6BayeVCRmLPZ3uK73QMpwY+wB6FI5 vr91YF76zTQJsS7oOitqVje+X5i8Q9h6Uyw/zfYjJuw4yIYtTFpRnbD0RqtgVkGGFJOy 05Taw/7RRGYrda4UKgHPefjlgZDGZ1E8BJrVBYXPOACpsWSqlbS0J8HoH89pyQ/7+mOP Xja/h3DAA75OqYKPV2/WFwig6d9sMllYqe14dsurDoch8qPmKuqS72QijuBMb39KMWxo 8bZpst7BPACO5Vpsmma8LsFidGTUPN/MsZZD2v/+jA+G3FBiqOmh0MqBdSl0KIw42SC7 IOfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=XaSdUc1XbvNixtddnys/F0BSKvOXVcs9aEF7o2exrtM=; b=WYAaJ26ISBCxpszKFlVvRYjuZasVrAEjLj7/8OKWu+jlW/6fPZLJ6aCLKYh4UPiFCB U/KOYdRxG8u/y/S3t7BA9C26qHVSfWKlCV3ZyfAevG8tCOtwDnIz1Ue+G/PVcnnjpOnm KoRoshJsonkG6kBZ25hx0f+svTx5LHn6g3TAbygW1jcRyNxIH/hXRTuOCXo7Uk0m5sYV 02Qttgt9WSocBphsyiavkRsyiI98y7IqQft338rmVIEOgx7bvejUVZgBKI79XOaLtIut DYQx1BAKxOwFPvTYhHlJlA5qWnp8KTwJIm/cfTp93MULDFC7eFvI6QhA+4BzxP8mHDiS 2EKA== X-Gm-Message-State: AD7BkJKoRRHWsNKXzikkJGBCCJYiZvdbZ4gxVLwTjFmCdL3JOcGnm/OjSleNNVIBwbbs/Y8At2d7ppUniqJu+g== MIME-Version: 1.0 X-Received: by 10.112.131.40 with SMTP id oj8mr6033158lbb.98.1458315520313; Fri, 18 Mar 2016 08:38:40 -0700 (PDT) Received: by 10.112.4.104 with HTTP; Fri, 18 Mar 2016 08:38:40 -0700 (PDT) In-Reply-To: References: Date: Fri, 18 Mar 2016 15:38:40 +0000 Message-ID: Subject: Re: [VOTE] Struts 2.3.27 From: Greg Huber To: Struts Developers List Content-Type: multipart/alternative; boundary=047d7b342bac8f0de1052e548ad3 --047d7b342bac8f0de1052e548ad3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The reason why its not working it needs to know whether it is an instanceof ServletRedirectResult in MessageStorePreResultListener. Rather than use the result (which do do not have) a possible solution is to construct what its looking for from the invocation and the use an equals. Map results =3D ((DefaultActionInvocation)invocation).getProxy().getConfig().getResults(); ResultConfig resultConfig =3D null; try { resultConfig =3D results.get(resultCode); } catch (NullPointerException e) { LOG.debug("Got NPE trying to read result configuration for resultCode [{}]", resultCode); } boolean isRedirect =3D false; try { //isRedirect =3D invocation.getResult() instanceof ServletRedirectResult; isRedirect =3D "org.apache.struts2.result.ServletRedirectResult".equals(resultConfig.getCl= assName()); } catch (Exception e) { LOG.warn("Cannot read result!", e); } On 18 March 2016 at 14:04, Lukasz Lenart wrote: > I see no other way just revert that change and change that was > introduced to fix the original issue > > > Regards > -- > =C5=81ukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > 2016-03-18 14:26 GMT+01:00 Greg Huber : > > Sorry forget the last email, its rubbish. Won't work. Thought the code > was > > part of the mod, which it is not. > > > > On 18 March 2016 at 11:45, Lukasz Lenart > wrote: > > > >> 2016-03-18 12:29 GMT+01:00 Greg Huber : > >> > I have tested it without the change (to DefaultActionInvocation) and > the > >> > messages work on the redirects. Unless it is confirmed that it is > >> required > >> > ie it does not work in its original position, its best not to change > >> such a > >> > key program. In my opinion. > >> > >> How do you use MessageStoreInterceptor with redirects? In AUTOMATIC or > >> STORE mode? > >> This change is needed to allow AUTOMATIC mode to work with redirects > >> > >> > >> > https://github.com/apache/struts/blob/master/core/src/main/java/org/apach= e/struts2/interceptor/MessageStorePreResultListener.java#L72 > >> > >> > >> Regards > >> -- > >> =C5=81ukasz > >> + 48 606 323 122 http://www.lenart.org.pl/ > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org > >> For additional commands, e-mail: dev-help@struts.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org > For additional commands, e-mail: dev-help@struts.apache.org > > --047d7b342bac8f0de1052e548ad3--