You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ralf Baumhof <ra...@web.de> on 2010/06/07 12:21:17 UTC

Accessing the parameter of a request leads to improper behaviour with special char codes like ä

I just figured out the follwoing problem 


we are using myfaces in geronimo and because we come from 
Germany we use the charset utf-8 in our pages. All pages have the 
properties charset=utf-8 and pageEncoding="utf-8" in the @page 
directive.  We also have got a SecurityFilter which watches our pages, 
and i.e. forces the user to authenticate if he enters some protected 
pages. All works fine. Now i am testing some new features, and therefore
 accessed the request from the SecurityFitler with the statement:


String vid = request.getParameter("form:versteckteFormID");


This of course also works, but now on all pages of the 
application i can not enter german special signs like ü ä and so on. The
 problem only occurs on input strings, data that is saved in the 
database is displayed correct. Is there a reason for this behaviour, or 
is it a bug in faces implementation??


in advance, much thanks for your help!!
___________________________________________________________
GRATIS für alle WEB.DE Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de

Re: Accessing the parameter of a request leads to improper behaviour with special char codes like ä

Posted by Jakob Korherr <ja...@gmail.com>.
Hi Ralf,

Have you tried setting the enconding to utf-8 in the filter before accessing
the request parameter (request.setCharacterEncoding("utf-8");)?

Regards,
Jakob

2010/6/7 Ralf Baumhof <ra...@web.de>

> I just figured out the follwoing problem
>
>
> we are using myfaces in geronimo and because we come from
> Germany we use the charset utf-8 in our pages. All pages have the
> properties charset=utf-8 and pageEncoding="utf-8" in the @page
> directive.  We also have got a SecurityFilter which watches our pages,
> and i.e. forces the user to authenticate if he enters some protected
> pages. All works fine. Now i am testing some new features, and therefore
>  accessed the request from the SecurityFitler with the statement:
>
>
> String vid = request.getParameter("form:versteckteFormID");
>
>
> This of course also works, but now on all pages of the
> application i can not enter german special signs like ü ä and so on. The
>  problem only occurs on input strings, data that is saved in the
> database is displayed correct. Is there a reason for this behaviour, or
> is it a bug in faces implementation??
>
>
> in advance, much thanks for your help!!
> ___________________________________________________________
> GRATIS für alle WEB.DE Nutzer: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://movieflat.web.de
>



-- 
Jakob Korherr

blog: http://www.jakobk.com
twitter: http://twitter.com/jakobkorherr
work: http://www.irian.at