You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by KwonNam Son <kw...@gmail.com> on 2006/12/20 05:08:34 UTC

f:param and UTF-8 URL Encoding

Hello,
The following is a fragment of my JSP.
<f:form>
   blah... blah...

   <h:commandLink rendered="true" id="lnkTemplateUpdateAction"
action="notificationTemplateUpdate" immediate="true" charset="utf-8">
     <f:param name="templateName" value="#{data.templateName}"/>
     <h:outputText value="#{data.templateName}" />
   </h:commandLink>

  blah.. blah...
</f:form>

I use f:param and value can be unicode(I use UTF-8).
Whern data.templateName is only english characters, there is no problem.
But, if there are unicode characters, a problem shows up.
When the action page take the prameter (using ExternalContext
.getRequestParameterMap())
the value comes out like this : &#50644;&#51652;&#50640;&#47084;
But what I expected is : %EC%97%94%EC%A7%84%EC%97%90%EB%9F%AC
(I use encoding servlet filter)

How can I make JSF encode parameters like
%EC%97%94%EC%A7%84%EC%97%90%EB%9F%AC ??

Thanks,

KwonNam.

Re: f:param and UTF-8 URL Encoding

Posted by Michel Goldstein <mi...@gmail.com>.
Are you having the same "old" problem with dealing with UTF-8  
encoding in JSF/JSP?

http://www.mail-archive.com/users@myfaces.apache.org/msg18723.html

I went through this problem in the past and the encoding problem that  
you are seeing was exactly what I was seeing back then (although I  
had problems with the encoded forms and not with an f:param exactly).  
f:param is implemented using post in the client side, so the problem  
could be the same.

Michel

On Dec 24, 2006, at 10:39 PM, Dave wrote:

> Hello, I have the same problem.
> any one knows the solution?
>
> Thanks!
>
> KwonNam Son <kw...@gmail.com> wrote:
> Hello,
> The following is a fragment of my JSP.
> <f:form>
>    blah... blah...
>
>    <h:commandLink rendered="true" id="lnkTemplateUpdateAction"  
> action="notificationTemplateUpdate" immediate="true" charset="utf-8">
>      <f:param name="templateName" value="#{data.templateName}"/>
>      <h:outputText value="#{data.templateName}" />
>    </h:commandLink>
>
>   blah.. blah...
> </f:form>
>
> I use f:param and value can be unicode(I use UTF-8).
> Whern data.templateName is only english characters, there is no  
> problem.
> But, if there are unicode characters, a problem shows up.
> When the action page take the prameter (using  
> ExternalContext .getRequestParameterMap())
> the value comes out like this : &#50644;&#51652;&#50640;&#47084;
> But what I expected is : %EC%97%94%EC%A7%84%EC%97%90%EB%9F%AC
> (I use encoding servlet filter)
>
> How can I make JSF encode parameters like %EC%97%94%EC%A7%84%EC%97% 
> 90%EB%9F%AC ??
>
> Thanks,
>
> KwonNam.
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com


Re: f:param and UTF-8 URL Encoding

Posted by Dave <ja...@yahoo.com>.
Hello, I have the same problem.
  any one knows the solution?
   
  Thanks!

KwonNam Son <kw...@gmail.com> wrote:
  Hello,
The following is a fragment of my JSP.
<f:form>
   blah... blah...

   <h:commandLink rendered="true" id="lnkTemplateUpdateAction" action="notificationTemplateUpdate" immediate="true" charset="utf-8"> 
     <f:param name="templateName" value="#{data.templateName}"/>
     <h:outputText value="#{data.templateName}" />
   </h:commandLink> 

  blah.. blah...
</f:form>

I use f:param and value can be unicode(I use UTF-8).
Whern data.templateName is only english characters, there is no problem.
But, if there are unicode characters, a problem shows up. 
When the action page take the prameter (using ExternalContext .getRequestParameterMap())
the value comes out like this : &#50644;&#51652;&#50640;&#47084;
But what I expected is : %EC%97%94%EC%A7%84%EC%97%90%EB%9F%AC 
(I use encoding servlet filter)

How can I make JSF encode parameters like %EC%97%94%EC%A7%84%EC%97%90%EB%9F%AC ??

Thanks,

KwonNam.



 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com