Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4CDFF200CD8 for ; Wed, 2 Aug 2017 16:23:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4B388169827; Wed, 2 Aug 2017 14:23:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 41100169808 for ; Wed, 2 Aug 2017 16:23:15 +0200 (CEST) Received: (qmail 76589 invoked by uid 500); 2 Aug 2017 14:23:14 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 76575 invoked by uid 99); 2 Aug 2017 14:23:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Aug 2017 14:23:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3A7AEC00CB for ; Wed, 2 Aug 2017 14:23:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.885 X-Spam-Level: * X-Spam-Status: No, score=1.885 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FORGED_HOTMAIL_RCVD2=1.187, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=hotmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 6uMpI8ISPtkd for ; Wed, 2 Aug 2017 14:23:10 +0000 (UTC) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-oln040092006044.outbound.protection.outlook.com [40.92.6.44]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 4F0AE5FB57 for ; Wed, 2 Aug 2017 14:23:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=cqnPCz5aZcOEtTjPsm1OFu0W9UItiO3I5T6qH2qPnkY=; b=f1rUBfcGtUiDqB128T0FeSaZQSYgl0vQohQAqvfBG0sa0ErH0C8bxWCsoefFc5ujqFayIVmddYAfDxKIjjJo+2jI4tHKCAjOvNlncbklLDxTGqCX/pqeH++sAXo6u+Hu+xQHkLU7/B1akymNdl+QYmx4IPSlhpWk8sCLvCdeh/RDrIxanJ5mKp+F8F1iQJyyXncf+yoEk/JglLVeghSD6+wpNNClBh0CFbq4Byacuesx9cNdkopsjzSvpfgdqPbJOmcLqa+S6GpAG+gqs/xjR1WWDtwHWcD0L67AepunKyBdtFMtlyktmX/KpeGlXruPN0vnHDJutdvUxNJYIDJ20Q== Received: from CO1NAM03FT039.eop-NAM03.prod.protection.outlook.com (10.152.80.56) by CO1NAM03HT012.eop-NAM03.prod.protection.outlook.com (10.152.80.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1304.16; Wed, 2 Aug 2017 14:23:02 +0000 Received: from BY2PR11MB0727.namprd11.prod.outlook.com (10.152.80.57) by CO1NAM03FT039.mail.protection.outlook.com (10.152.81.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1304.16 via Frontend Transport; Wed, 2 Aug 2017 14:23:02 +0000 Received: from BY2PR11MB0727.namprd11.prod.outlook.com ([10.163.112.13]) by BY2PR11MB0727.namprd11.prod.outlook.com ([10.163.112.13]) with mapi id 15.01.1304.023; Wed, 2 Aug 2017 14:23:02 +0000 From: Rubens Gomes To: Struts Users Mailing List Subject: Re: Request Parameter not being set on Action Thread-Topic: Request Parameter not being set on Action Thread-Index: AQHTC1lW4SvvEgp6kkGMzh4EqnYQv6JwxT6AgABYbm0= Date: Wed, 2 Aug 2017 14:23:02 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:07EB32FD45371C21BDEE58C74F43DB8E1CA5C6F5C018A37B8C44D086B06E4443;UpperCasedChecksum:73365CF3FAC89C34055BF99CA2611F209872CA1779121672F16E2ABCEADC3A82;SizeAsReceived:7275;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [l6NQxsCvEZpszvCN+vkX9+mnSGHKos1F] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CO1NAM03HT012;7:7v23KV9VT2w2/3Lm64SJ+OMKEDb8h8Em3BMzZ/Una7bCboxSTCZKWO+RWFBKM977MJiBdwws8OvbbEF8lzg3QXv6eYXufsnFNkBADZrc6cR5h+Kz3tbe67SqXGVKx/lqF8Kpvl/9YAmptOri1+mhknyPzTehn9NhoS2tDgvOujyNMXOJXBYsB77tXNnwJD1o9nZRZckcdOTDHnAaNghproM4rq3ARfxdLx863xjjTxel39BHIJeFKmlX9/rgW0SZgwXpZ+anYNC33rmv7wPUMoQ6In6ZQBSut4mQcaE4c/w5RiHEXEWgybLmwA0/b9EiFzm2PRJbbbUdmiUX7KqVZm97dELhklv+1ZiaZAl9/7/OzO+fVAstJ5ycLUDRc+6nzqEA3pY5+cfquysBBnrxgScMbWxwEBoL8CXxjQpTdWYL0Sp1i1lFhFP10RIRhBgCVCvUXx+ynxQTC15ILiDOoFYxYkxXo0Gzeee3tR7vZxPm60vRB/QPJ/nlBohWqzFo2D9Y77aIKaJgLdWf7NI8g1aIwKBrPA81HWXozioAbkhBvTt1il5vaUnBXY79FRRk5vmo3iD51G/Vknqy28bFBj0PZHdJ4d6hsqUmpgj4tvMAcywcB2Na+IHx0/bCj0HuQUEF69Yo9RwFm7juMxUCOmYkX+bXj8SUYtCsRhdoJZuNOflnKQXQJqY0rrklWnaJknLTATJpSN436Qx+dBWRR7TR+l2bttDad5ktXDvHL6qoT2RVrd0DVUA/4MxPGrul5YTxDD0IHYS4SD1rSLOGvQ== x-incomingheadercount: 45 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI;SFV:NSPM;SFS:(7070007)(98901004);DIR:OUT;SFP:1901;SCL:1;SRVR:CO1NAM03HT012;H:BY2PR11MB0727.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en; x-ms-office365-filtering-correlation-id: 56c33d44-1034-4b06-15a4-08d4d9b1fbdd x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322377)(1603101448)(1601125374)(1701031045)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CO1NAM03HT012; x-ms-traffictypediagnostic: CO1NAM03HT012: authentication-results: outbound.protection.outlook.com; spf=skipped (originating message); dkim=none (message not signed) header.d=none; dmarc=none action=none header.from=hotmail.com; x-exchange-antispam-report-test: UriScan:(265634631926514)(194151415913766); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031);SRVR:CO1NAM03HT012;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CO1NAM03HT012; x-forefront-prvs: 0387D64A71 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2017 14:23:02.2841 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM03HT012 archived-at: Wed, 02 Aug 2017 14:23:16 -0000 I noticed that the request_locale was not found, and that's fine. However,= the pageUrl was found in the HttpParameters and it is not being set on the= action. Below is the Action class and struts.xml: @SuppressWarnings("serial") @Results( { @Result(name=3DAction.INPUT, location=3D"/WEB-INF/content/${device}/error.jsp", type=3D"dispatcher"), @Result(name=3DAction.SUCCESS, location=3D"${redirectURL}", type=3D"redirect") } ) public class ChangeLocaleAction extends BaseAction { private String pageUrl; public ChangeLocaleAction() { super(); } @Override public void validate() { if(StringUtils.isBlank(pageUrl)) { addActionError( getText("error.urlmissing") ); } } @Override public String execute() { try { pageUrl =3D URLDecoder.decode(pageUrl, "UTF-8"); HttpServletRequest request =3D getRequest(); if(request =3D=3D null) { throw new IllegalArgumentException("HTTP request not found.= "); } /* * The redirect automatically inserts the context path. We nee= d * to remove the context path in redirectURL to prevent duplica= te * contextPaths in the redirect. */ String contextPath =3D request.getContextPath(); if (pageUrl.startsWith(contextPath)) { pageUrl =3D pageUrl.replaceFirst(contextPath, ""); logger.debug("redirectURL set to [{}]", pageUrl); } } catch(UnsupportedEncodingException ex) { throw new RuntimeException("error decoding url: " + pageUrl, ex= ); } return SUCCESS; } /** * @return the pageUrl */ public String getPageUrl() { return pageUrl; } /** * @param pageUrl the pageUrl to set */ public void setPageUrl(String pageUrl) { this.pageUrl =3D pageUrl; } } true ERROR com.ezlista dojo\..*,^struts\..*,^sessio= n\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,paramete= rs\...*,^_csrf /view-login.do /WEB-INF/content/${device}/error.jsp /WEB-INF/content/${device}/error.jsp /WEB-INF/content/${device}/warning.jsp /WEB-INF/content/${device}/about.jsp /WEB-INF/content/${device}/help.jsp /WEB-INF/content/${device}/language-help.jsp /WEB-INF/content/${device}/pending-email-help.jsp /WEB-INF/content/${device}/privacy.jsp /WEB-INF/content/${device}/remember-help.jsp /WEB-INF/content/${device}/terms.jsp /WEB-INF/content/${device}/terms-service.jsp /WEB-INF/content/${device}/session-timeout.jsp ________________________________________ From: Lukasz Lenart Sent: Wednesday, August 2, 2017 5:01 AM To: Struts Users Mailing List Subject: Re: Request Parameter not being set on Action 2017-08-02 8:34 GMT+02:00 Rubens Gomes : > The request below is sent , but the parameters (request_locale/pageUrl) a= re not set on the action. > > http://localhost:8080/change-locale.do?request_locale=3Den&pageUrl=3D%2Fv= iew-login.do The "request_locale" parameter is a special parameter that tells I18NInterceptor to change locale, it will be removed after that so you cannot access it in an action. If you need to access locale in an action and assuming your extending the ActionSupport class just call the "getLocale()" method. Regarding the "pageUrl" parameter, can you start with a simple example? Or maybe post your struts.xml plus an action's class? Regards -- =A3ukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org