Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 1621 invoked from network); 10 Feb 2005 22:29:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Feb 2005 22:29:28 -0000 Received: (qmail 43550 invoked by uid 500); 10 Feb 2005 22:29:13 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 43526 invoked by uid 500); 10 Feb 2005 22:29:13 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 43513 invoked by uid 99); 10 Feb 2005 22:29:13 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from smtpauth04.mail.atl.earthlink.net (HELO smtpauth04.mail.atl.earthlink.net) (209.86.89.64) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 10 Feb 2005 14:29:09 -0800 Received: from [70.19.252.175] (helo=friedman) by smtpauth04.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1CzMo6-0002tE-R7 for user@struts.apache.org; Thu, 10 Feb 2005 17:29:07 -0500 From: "David G. Friedman" To: "Struts Users Mailing List" Subject: RE: Redirect instead of forward in action mapping Date: Thu, 10 Feb 2005 17:29:20 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 In-Reply-To: <241F3F05CDE1A646AA973346D7629ED305183B16@uswpmx13.merck.com> Importance: Normal X-ELNK-Trace: b135f2a34802a90f6f36dc87813833b242db76727cc5621b01efe225e88bb6c3fd2e24a0034f2fe9350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 70.19.252.175 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N A JSP can use the tiles taglib and pick a tiles definition to "show". This is how I setup my webapps' index.jsp page. Tiles allows for two ways... The first I use in my index page so my initial action does not have to be a struts Action, just the plain old /index.jsp page: <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> The other includes a page and sets parameters of your choice (again, from the tiles-defs.xml file or anything else your plugIn knows about) for you: <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> etc..... Regards, David -----Original Message----- From: Benedict, Paul C [mailto:paul_benedict@merck.com] Sent: Thursday, February 10, 2005 12:47 PM To: 'Struts Users Mailing List' Subject: RE: Redirect instead of forward in action mapping Neil, Unfortunately I know of no "better" way of accomplishing this. Redirects are for the benefit of the user anyway -- they get a new address bar location -- and so this really shouldn't be an issue. Thanks, Paul -----Original Message----- From: Neil Aggarwal [mailto:neil@JAMMConsulting.com] Sent: Thursday, February 10, 2005 12:40 PM To: 'Struts Users Mailing List' Subject: RE: Redirect instead of forward in action mapping Paul: I see. I did this which worked: Is there a better approach to doing this? Thanks, Neil -- Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com FREE! Valuable info on how your business can reduce operating costs by 17% or more in 6 months or less! http://newsletter.JAMMConsulting.com > -----Original Message----- > From: Benedict, Paul C [mailto:paul_benedict@merck.com] > Sent: Thursday, February 10, 2005 11:30 AM > To: 'Struts Users Mailing List' > Cc: 'Neil Aggarwal' > Subject: RE: Redirect instead of forward in action mapping > > > Neil, > > You cannot redirect to a Tile. A Redirect is specific to a URI. > > Thanks, > Paul > > -----Original Message----- > From: Neil Aggarwal [mailto:neil@JAMMConsulting.com] > Sent: Thursday, February 10, 2005 12:13 PM > To: 'Struts Users Mailing List' > Subject: RE: Redirect instead of forward in action mapping > > > Bill: > > I tried adding the redirect="true" parameter to my success > forward and it does not seem to have an effect. When > I get to the success page and hit the reload button on my > browser, the form data is posted again. > > You can try it by going to: > https://dev.jammconsulting.com/pricetracker/register.do > enter something (junk is OK) in the email address field > and hit the Save button. When you get to the > success page, hit the reload button on the browser. > You will get a pop up that tells you it is resending > the information. > > Here is what I have in my struts-config.xml file: > type="register.RegisterAction" > name="registerForm" > scope="request" > input="register.index" > validate="true"> > redirect="true"/> > > > Any ideas why that did not work? > > Thanks, > Neil > > > -- > Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com > FREE! Valuable info on how your business can reduce operating costs by > 17% or more in 6 months or less! http://newsletter.JAMMConsulting.com > > > -----Original Message----- > > From: news [mailto:news@sea.gmane.org] On Behalf Of Bill Siggelkow > > Sent: Wednesday, February 09, 2005 10:23 PM > > To: user@struts.apache.org > > Subject: Re: Redirect instead of forward in action mapping > > > > > > Set the redirect attribute on the forward to true: > > > > > > > > Of course, if the success page displays data you will need to > > make sure > > that is is available in the session since it you will be > > issuing a new > > request. (You may want to look into the saveMessages(HttpSession > > session) method). > > > > Neil Aggarwal wrote: > > > > > Hello: > > > > > > When I set up a form in struts, I am using this action > > > mapping: > > > > > > > > type="register.RegisterAction" > > > name="registerForm" > > > scope="request" > > > input="register.index" > > > validate="true"> > > > > > > > > > > > > When the form is posted successfully, the user is forwarded > > > to a page that says their information was entered successfully. > > > > > > Unfortunately, if they hit reload on that page, it will re-execute > > > the form and their data will be posted again. > > > > > > To get around this, I use a redirect instead of forward in many > > > of my apps. > > > > > > Is there a way to do that within struts? > > > > > > Thanks, > > > Neil > > > > > > > > > -- > > > Neil Aggarwal, JAMM Consulting, (972)612-6056, > > www.JAMMConsulting.com > > > FREE! Valuable info on how your business can reduce > > operating costs by > > > 17% or more in 6 months or less! > > http://newsletter.JAMMConsulting.com > > > > > > > --------------------------------------------------------------------- > > 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 > > > > > -------------------------------------------------------------- > ---------------- > Notice: This e-mail message, together with any attachments, > contains information of Merck & Co., Inc. (One Merck Drive, > Whitehouse Station, New Jersey, USA 08889), and/or its > affiliates (which may be known outside the United States as > Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as > Banyu) that may be confidential, proprietary copyrighted > and/or legally privileged. It is intended solely for the use > of the individual or entity named on this message. If you > are not the intended recipient, and have received this > message in error, please notify us immediately by reply > e-mail and then delete it from your system. > -------------------------------------------------------------- > ---------------- > > --------------------------------------------------------------------- > 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 ---------------------------------------------------------------------------- -- Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. ---------------------------------------------------------------------------- -- --------------------------------------------------------------------- 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