You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Masoud Kalali <ma...@secretshouse.com> on 2004/08/12 06:06:34 UTC
Struts - passing unicode parameter from jsp to action
hi friends, i have problem with sending unicode parameter to my action
from jsp page
I use post for sending parameter to action
and also add
(request.setCharacterEncoding("UTF-8");
to my action before reading parameter from it , also i add two
difinition on my jsp page <%request.setcharacterEncoding("UTF-8");%>
and <meta .../> which both of them set content and encoding of my jsp
pages to utf-8 but i istill could not use my parameter , thier encoding
seems to be " ISO Latin-1 " . while i type unicode characters in my
text are at jsp page.
I use Websphere as APPS , is it a problem of Websphere?
or i should make some changes?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts - passing unicode parameter from jsp to action
Posted by Masoud Kalali <ma...@secretshouse.com>.
Pavel Kolesnikov wrote:
>On Thu, 12 Aug 2004, Masoud Kalali wrote:
>
>
>
>>I use post for sending parameter to action and also add
>>(request.setCharacterEncoding("UTF-8");
>>to my action before reading parameter from it , also i add two
>>
>>
>
>You should better call request.setCharacterEncoding() in
>a filter or overriden ActionServlet's method process().
>
>Request parameters are read when ActionServlet prepares form
>instances - it happens before your Action is called.
>
>
>
>>difinition on my jsp page <%request.setcharacterEncoding("UTF-8");%>
>>
>>
>
>I think you have no reason to put this call in your JSP.
>
>Pavel
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>
>
hi
thank you for your post.
I test what you said , for creating a filter and apply it on web.xml ,
but still i could not get parameter in utf-8 and those are in ISO
Latin-1 encoding , could you post the filter you mean here?
is it possible that WAS does not support UTF-8 parameter?
thank you
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts - passing unicode parameter from jsp to action
Posted by Pavel Kolesnikov <k...@les.cz>.
On Thu, 12 Aug 2004, Masoud Kalali wrote:
> I use post for sending parameter to action and also add
> (request.setCharacterEncoding("UTF-8");
> to my action before reading parameter from it , also i add two
You should better call request.setCharacterEncoding() in
a filter or overriden ActionServlet's method process().
Request parameters are read when ActionServlet prepares form
instances - it happens before your Action is called.
> difinition on my jsp page <%request.setcharacterEncoding("UTF-8");%>
I think you have no reason to put this call in your JSP.
Pavel
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org