Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 2348 invoked from network); 10 Nov 2006 23:50:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Nov 2006 23:50:36 -0000 Received: (qmail 89330 invoked by uid 500); 10 Nov 2006 23:50:37 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 89296 invoked by uid 500); 10 Nov 2006 23:50:37 -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 89284 invoked by uid 99); 10 Nov 2006 23:50:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Nov 2006 15:50:37 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [204.127.200.83] (HELO sccrmhc13.comcast.net) (204.127.200.83) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Nov 2006 15:50:22 -0800 Received: from [192.168.1.47] (c-69-143-26-154.hsd1.va.comcast.net[69.143.26.154]) by comcast.net (sccrmhc13) with ESMTP id <200611102350000130090411e>; Fri, 10 Nov 2006 23:50:00 +0000 Message-ID: <45551023.1070607@christopherschultz.net> Date: Fri, 10 Nov 2006 18:49:55 -0500 From: Christopher Schultz User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Struts Users Mailing List Subject: Re: [s2] Dynamically Parameterize Redirect Result References: In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mark, Mark Menard wrote: > Is there a way to dynamically parameterize a redirect result based on an > http request parameter that you have used in the action your are redirecting > from? This isn't exactly struts-2 specific, if I'm reading this correctly. > Is there a way to get a parameter that was passed to createPartyRoleType > into the redirect on success? One way to do it is like this, at the end of your action: ActionForward next = mapping.findForward("redirect-action"); return new ActionForward(next.getPath() + "?id=" + id, next.getRedirect()); There is also ActionRedirect, which essentially wraps an existing ActionForward: ActionRedirect next = new ActionRedirect(mapping.findForward("...")); next.addParameter("id", id); return next; I personally think that ActionRedirect isn't good enough, and needs a lot of improvement. I write my own class and submitted it as an attachment to https://issues.apache.org/struts/browse/STR-2538, but nobody seemed interested. Everyone is free to use this class if they'd like. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFVRAj9CaO5/Lv0PARArG7AKCMT5MGdFgUqR6WUWD2ptIxTI5odgCeJl5d VfPtoSuUAzK49IUsAbF4F5k= =Xoua -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org