You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ulf Liedén <ul...@lieden.net> on 2010/03/15 09:42:56 UTC
Request Encoding
Hi all,
when my struts application receives form entries containing french character
(i.e. é è) they are converted to something else, like é è.
This has probably something to do with how the request is encoded. I've
tried to add
ServletActionContext.getRequest().setCharacterEncoding("UTF-8");
to the action class validate() method, and
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
to the JSP, but this doesn't help. Any suggestions?
Best regards,
Ulf
Re: Request Encoding
Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/3/15 Ulf Liedén <ul...@lieden.net>:
> to the JSP, but this doesn't help. Any suggestions?
Add encoding filter to web.xml
Regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Request Encoding
Posted by Ulf Liedén <ul...@gmail.com>.
Hi Manos, Lukasz,
and thanks for the replies. Setting the URIEncoding="UTF-8" in the
server.xml didn't do the trick for me, but so did an UTF8Filter in the
web.xml.
Best regards,
Ulf
On Mon, Mar 15, 2010 at 11:20 AM, Manos Batsis
<ma...@geekologue.com>wrote:
> Ulf Liedén wrote:
>
>> when my struts application receives form entries containing french
>> character
>> (i.e. é è) they are converted to something else, like é è.
>>
>> This has probably something to do with how the request is encoded. I've
>> tried to add
>>
>> ServletActionContext.getRequest().setCharacterEncoding("UTF-8");
>>
>> to the action class validate() method, and
>>
>> <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
>>
>> to the JSP, but this doesn't help. Any suggestions?
>>
>
>
> If you are using Tomcat, you need to update $CATALINA_HOME/conf/server.xml
>
> More specifically, you need to add the
>
> URIEncoding="UTF-8"
>
> to the Connector element for port 80 or 8080.
>
> Cheers,
>
> Manos
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Request Encoding
Posted by Manos Batsis <ma...@geekologue.com>.
Ulf Liedén wrote:
> when my struts application receives form entries containing french character
> (i.e. é è) they are converted to something else, like é è.
>
> This has probably something to do with how the request is encoded. I've
> tried to add
>
> ServletActionContext.getRequest().setCharacterEncoding("UTF-8");
>
> to the action class validate() method, and
>
> <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
>
> to the JSP, but this doesn't help. Any suggestions?
If you are using Tomcat, you need to update $CATALINA_HOME/conf/server.xml
More specifically, you need to add the
URIEncoding="UTF-8"
to the Connector element for port 80 or 8080.
Cheers,
Manos
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org