Fwd: No Redirects in Struts 1.1
X-Server-Uuid: 77EBEC63-E6AD-49BA-924C-CB5276DAA9C7 From: Hossfeld, Frank [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED], '[EMAIL PROTECTED]' [EMAIL PROTECTED], '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: No Redirects in Struts 1.1 Date: Fri, 21 Feb 2003 11:12:07 +0100 X-Mailer: Internet Mail Service (5.5.2653.19) X-WSS-ID: 124B240463827-01-01 Hi, I don't know why, but I am not able to post messages in the list, so I 'll send you my response directly. Perhaps somebody can post it. Thanks Frank I think, this is a problem in Struts. If you use the struts token-solution to avoid double-clicks, you have to check the token in every action. When redirecting from one action to another, it is necessary, that the token is part of the redirected URL. Maybe I didn't see it, but if you look in the RequestProcessor-Class and examine the processActionForward-Method, there is no work done with the Token. (Means, the token is not part of the redirected URL) If you overwrite the processForwardConfig-Method by adding the token to the redirected URL, it works fine. Thats the coding: protected void processForwardConfig(HttpServletRequest request, HttpServletResponse response, ForwardConfig forward) throws IOException, ServletException { if (forward == null) { return; } if (log.isDebugEnabled()) { log.debug(processForwardConfig( + forward + )); } String uri = RequestUtils.forwardURL(request, forward); if (forward.getRedirect()) { // Patch Start if (request.getSession(false).getAttribute(Globals.TRANSACTION_TOKEN_KEY) != null) { if (uri.indexOf(org.apache.struts.taglib.html.Constants.TOKEN_KEY) 0) { if (uri.indexOf(?) = 0) { uri += ; } else { uri += ?; } uri += org.apache.struts.taglib.html.Constants.TOKEN_KEY + = + request.getSession(false).getAttribute(Globals.TRANSACTION_TOKEN_KEY); } } // Patch End response.sendRedirect(response.encodeRedirectURL(request.getContextPath() + uri)); } else { doForward(uri, request, response); } } } I don't know, if this is the right way to solve it, but it works .. :-) If there is anybody out there who has a better idea, I would like to read it. Regards Frank -- Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail nicht gestattet ist.Diese Nachricht ist ausschliesslich fuer den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen. For legal and security reasons the information provided in this e-mail is not legally binding. Upon request we would be pleased to provide you with a legally binding confirmation in written form. Any form of unauthorised use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. This message is exclusively for the person addressed or their representative. If you are not the intended recipient of this message and its contents, please notify the sender immediately. == LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
No Redirects in Struts 1.1?
Is there no way to redirect to an offsite url in Struts 1.1? If so, I am not sure that the new features are much better than a bug. LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No Redirects in Struts 1.1?
There was a bug with absolute url redirects but it has been fixed. Try one of the recent nightlies. David From: Micael [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: No Redirects in Struts 1.1? Date: Thu, 20 Feb 2003 13:38:51 -0800 Is there no way to redirect to an offsite url in Struts 1.1? If so, I am not sure that the new features are much better than a bug. LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No Redirects in Struts 1.1?
How does that work, David? I take it that we need to build the framework from scratch with a nightly? Are each of the nightlies such that they will work? Or, is it catch as catch can? Do you have any idea when the beta will be updated to include this fix? At 02:49 PM 2/20/03 -0700, you wrote: There was a bug with absolute url redirects but it has been fixed. Try one of the recent nightlies. David From: Micael [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: No Redirects in Struts 1.1? Date: Thu, 20 Feb 2003 13:38:51 -0800 Is there no way to redirect to an offsite url in Struts 1.1? If so, I am not sure that the new features are much better than a bug. LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No Redirects in Struts 1.1?
You can build from source if you want but it's easier just to download a nightly binary. David From: Micael [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: No Redirects in Struts 1.1? Date: Thu, 20 Feb 2003 13:53:25 -0800 How does that work, David? I take it that we need to build the framework from scratch with a nightly? Are each of the nightlies such that they will work? Or, is it catch as catch can? Do you have any idea when the beta will be updated to include this fix? At 02:49 PM 2/20/03 -0700, you wrote: There was a bug with absolute url redirects but it has been fixed. Try one of the recent nightlies. David From: Micael [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: No Redirects in Struts 1.1? Date: Thu, 20 Feb 2003 13:38:51 -0800 Is there no way to redirect to an offsite url in Struts 1.1? If so, I am not sure that the new features are much better than a bug. LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No Redirects in Struts 1.1?
hum, David does that also affect ANY redirect set when set in the forward element of an action? I've noticed that if I specify redirect=true, and I get 'redirected' to a page after form submit and I click the reload button, it actually inserts a new record in the DB! I've been trying to figure out if I'm missing something or if it's actually a bug! (using 1.1b3) Thanks On Thursday, Feb 20, 2003, at 17:09 US/Eastern, David Graham wrote: You can build from source if you want but it's easier just to download a nightly binary. David From: Micael [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: No Redirects in Struts 1.1? Date: Thu, 20 Feb 2003 13:53:25 -0800 How does that work, David? I take it that we need to build the framework from scratch with a nightly? Are each of the nightlies such that they will work? Or, is it catch as catch can? Do you have any idea when the beta will be updated to include this fix? At 02:49 PM 2/20/03 -0700, you wrote: There was a bug with absolute url redirects but it has been fixed. Try one of the recent nightlies. David From: Micael [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: No Redirects in Struts 1.1? Date: Thu, 20 Feb 2003 13:38:51 -0800 Is there no way to redirect to an offsite url in Struts 1.1? If so, I am not sure that the new features are much better than a bug. LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: No Redirects in Struts 1.1?
If your action submits a form, pressing reload will attempt to submit the same form. It's not a Struts problem. Ted Husted's tips used to have something about using a putting a token in your action that stops multiple submissions. We did it here, but I wasn't the guy, so can't help more, sorry : ) http://husted.com/struts/tips/index.html -Original Message- From: Robert S. Sfeir [mailto:[EMAIL PROTECTED]] Sent: Friday, 21 February 2003 9:35 AM To: Struts Users Mailing List Subject: Re: No Redirects in Struts 1.1? hum, David does that also affect ANY redirect set when set in the forward element of an action? I've noticed that if I specify redirect=true, and I get 'redirected' to a page after form submit and I click the reload button, it actually inserts a new record in the DB! I've been trying to figure out if I'm missing something or if it's actually a bug! (using 1.1b3) Thanks On Thursday, Feb 20, 2003, at 17:09 US/Eastern, David Graham wrote: You can build from source if you want but it's easier just to download a nightly binary. David From: Micael [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: No Redirects in Struts 1.1? Date: Thu, 20 Feb 2003 13:53:25 -0800 How does that work, David? I take it that we need to build the framework from scratch with a nightly? Are each of the nightlies such that they will work? Or, is it catch as catch can? Do you have any idea when the beta will be updated to include this fix? At 02:49 PM 2/20/03 -0700, you wrote: There was a bug with absolute url redirects but it has been fixed. Try one of the recent nightlies. David From: Micael [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: No Redirects in Struts 1.1? Date: Thu, 20 Feb 2003 13:38:51 -0800 Is there no way to redirect to an offsite url in Struts 1.1? If so, I am not sure that the new features are much better than a bug. LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No Redirects in Struts 1.1?
The bug only affected absolute url redirects, not redirects to a url within your app. See the Action class javadoc for the token related methods to prevent a form from being submitted twice. David hum, David does that also affect ANY redirect set when set in the forward element of an action? I've noticed that if I specify redirect=true, and I get 'redirected' to a page after form submit and I click the reload button, it actually inserts a new record in the DB! I've been trying to figure out if I'm missing something or if it's actually a bug! (using 1.1b3) Thanks On Thursday, Feb 20, 2003, at 17:09 US/Eastern, David Graham wrote: You can build from source if you want but it's easier just to download a nightly binary. David From: Micael [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: No Redirects in Struts 1.1? Date: Thu, 20 Feb 2003 13:53:25 -0800 How does that work, David? I take it that we need to build the framework from scratch with a nightly? Are each of the nightlies such that they will work? Or, is it catch as catch can? Do you have any idea when the beta will be updated to include this fix? At 02:49 PM 2/20/03 -0700, you wrote: There was a bug with absolute url redirects but it has been fixed. Try one of the recent nightlies. David From: Micael [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: No Redirects in Struts 1.1? Date: Thu, 20 Feb 2003 13:38:51 -0800 Is there no way to redirect to an offsite url in Struts 1.1? If so, I am not sure that the new features are much better than a bug. LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]