John-
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
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter::doFilter(ServletRequest
 req,ServletResponse res,FilterChain chain) throws IOException,ServletException 
{
....
java.util.Enumeration e = request.getParmeterNames();
Object value=null
String name=null;
while(e.hasMoreElements())
{
 value=e.nextElement();
 name=value.toString();
 
this.filterConfig.getServletContext().setAttribute(name,request.getParameter(name));
}
//save the request and response just in case
this.filterConfig.getServletContext().setAttribute("ServletRequest",request);
this.filterConfig.getServletContext().setAttribute("ServletResponse",response);
}

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 ..as soon as youre done drying out your basement from hurricane sandy can 
you check this?

Thanks
Martin Gainty 
______________________________________________ 
Place long winded disclaimer here


From: mgai...@hotmail.com
To: user@struts.apache.org
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" %>

Martin 
______________________________________________ 
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: user@struts.apache.org
> From: jlm...@gmail.com
> 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 <j...@rodaxsoft.com>
> Date: Sat, 27 Oct 2012 18:09:13 
> To: user@struts.apache.org<user@struts.apache.org>
> Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
> 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 2.3.4.1 -->
> <result name="success" type="redirect">
>       <param name="location">http://skd.bz/ios</param>
> </result>
> ...
> 
> Thank you,
> John Boyer
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> �ТÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐÐ¥FòVç7V'67&–&RÂRÖÖ–âW6W"×Vç7V'67&–&T7G'WG2æ6†Ræ÷&pФf÷"FF—F–öæÂ6öÖÖæG2ÂRÖÖ–âW6W"Ö†VÇ7G'WG2æ6†Ræ÷&pÐ
                                                                                
  

Reply via email to