struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: [Struts 2] Redirect Stopped Working After Struts 2 Upgrade
Date Mon, 29 Oct 2012 17:46:58 GMT

i could not get the StrutsPrepareAndExecuteFilter to pass ServletRequest Attributes so I made
some Q&d mods to get the front end Parameters to pass to ActionSupport back-end

//mods for StrutsPrepateAndExecuteFilter
req,ServletResponse res,FilterChain chain) throws IOException,ServletException {
java.util.Enumeration e = request.getParmeterNames();
Object value=null
String name=null;
//save the request and response just in case

to access:
public class GetAClueAction extends ActionSupport {
public String getAclue()
 String AClue=(String)ServletActionContext.getServletContext().getAttribute("AClue");
 return AClue;
public javax.servlet.http.HttpServletResponse getResponse()
 javax.servlet.http.HttpServletResponse resp=(javax.servlet.http.HttpServletResponse)ServletActionContext.getServletContext().getAttribute("ServletResponse");
 return resp;
public javax.servlet.http.ReqHttpServletRequest getRequest()
 javax.servlet.http.HttpServletRequest req=(javax.servlet.http.HttpServletRequest)ServletActionContext.getServletContext().getAttribute("ServletRequest");
 return req;

dave soon as youre done drying out your basement from hurricane sandy can you check this?

Martin Gainty 
Place long winded disclaimer here

Subject: RE: [Struts 2] Redirect Stopped Working After Struts 2 Upgrade
Date: Sat, 27 Oct 2012 22:20:49 -0400

place this encoding directuve at the top of each jsp

<%@ page contentType="text/html; charset=UTF-8" %>

Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist
unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet
keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire
prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe
quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les
email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune
responsabilité pour le contenu fourni.

> Subject: Re: [Struts 2] Redirect Stopped Working After Struts 2 Upgrade
> To:
> From:
> Date: Sun, 28 Oct 2012 02:12:51 +0000
> Have you tried to use Persist on the console to see the actual responses FF is getting?
That would give you some idea.
> JL
> Sent via BlackBerry from T-Mobile
> -----Original Message-----
> From: John Boyer <>
> Date: Sat, 27 Oct 2012 18:09:13 
> To:<>
> Reply-To: "Struts Users Mailing List" <>
> Subject: [Struts 2] Redirect Stopped Working After Struts 2 Upgrade
> Hello:
> Without making any code changes, I upgraded my Struts 2 libraries from v2.2.1 to v2.3.4.1.
However, a redirect URL no longer works in Firefox or Safari. It works fine in Struts v2.2.1.
> No errors or warnings appear in the log but, here's the warning I get in Firefox Firebug:

> "A form was submitted in the windows-1252 encoding which cannot encode all Unicode characters,
so user input may get corrupted. To avoid this problem, the page should be changed so that
the form is submitted in the UTF-8 encoding either by changing the encoding of the page itself
to UTF-8 or by specifying accept-charset=utf-8 on the form element."
> Does anyone know what might going wrong or have any suggestions?
> ...
> <!-- Prevent double submits -->
> <interceptor-ref name="tokenSession"/>
> <interceptor-ref name="defaultStack"/>
> <!-- Broken redirect in -->
> <result name="success" type="redirect">
> 	<param name="location"></param>
> </result>
> ...
> Thank you,
> John Boyer
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message