I would change your result configuration to:

      <result name="retornoBusca" type="redirectAction">
        <param name="actionName">list</param>
        <param name="nomeBusca">${nomeBusca}</param>
        <param name="cpfBusca">${cpfBusca}</param>
        <param name="page">${page}</param>
      </result>

This style works for me with unicode (Chinese) data.

When you use the param tab it 'knows" it is for a URL and will properly
encode the data.


2009/9/15 "Francisco Barroso (Fortes Informática)" <
franciscobarr...@grupofortes.com.br>

> flow variable nomeBusca:
>
> (update) ColaboradorEditAction.java   >   xwork-Colaborador.xml  > (list)
> ColaboradorListAction.java (BUG)
>
> ------------ColaboradorEditAction.java----------
>
> package com.fortes.rh.web.action.geral;
>
> import com.fortes.rh.web.action.MyActionSupportEdit;
> import com.opensymphony.xwork.Action;
>
> @SuppressWarnings({ "unchecked", "serial" })
> public class ColaboradorEditAction extends MyActionSupportEdit
> {
>   private String nomeBusca;
>
>   public String execute() throws Exception
>   {
>       return Action.SUCCESS;
>   }
>
>   public String update() throws Exception
>   {
>       System.out.println(nomeBusca); //OK
>             return Action.SUCCESS;
>   }
>
>   //getters and  setters...
> }
>
> ------------xwork-Colaborador.xml--------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN" "
> http://www.opensymphony.com/xwork/xwork-1.0.dtd";>
>
> <xwork>
>   <package name="colaborador" extends="default"
> namespace="/geral/colaborador">
>       <action name="update"
> class="com.fortes.rh.web.action.geral.ColaboradorEditAction"
> method="update">
>               <result name="retornoBusca"
> type="redirect"><![CDATA[list.action?nomeBusca=${nomeBusca}&cpfBusca=${cpfBusca}&page=${page}]]></result>
>       </action>
>   </package>
> </xwork>
>
> ------------ColaboradorListAction.java----------
>
> package com.fortes.rh.web.action.geral;
>
> import com.fortes.rh.web.action.MyActionSupportList;
> import com.opensymphony.xwork.Action;
>
> @SuppressWarnings({"serial"})
> public class ColaboradorListAction extends MyActionSupportList
> {
>   private String nomeBusca;
>
>   @SuppressWarnings("unchecked")
>   public String list() throws Exception
>   {
>       System.out.println(nomeBusca);// BUGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
>       return Action.SUCCESS;
>   }
>
> }
>
> Greg Lindholm escreveu:
>
>  Better show your full action and result configuration from struts.xml so
>> we
>> can see how you are passing parameters.
>>
>> 2009/9/15 "Francisco Barroso (Fortes Informática)" <
>> franciscobarr...@grupofortes.com.br>
>>
>>
>>
>>> I've done it already (change URIEncoding to UTF-8).
>>> The problem persists...
>>>
>>> Greg Lindholm escreveu:
>>>
>>>  If
>>>
>>>
>>>> If you are using Tomcat as a server then you will need to add
>>>> URIEncoding="UTF-8" attribute to the Connector in the server.xml file,
>>>> If
>>>> not specified, ISO-8859-1 will be used [1].
>>>>
>>>> This URIEncoding attribute applies only to GET requests (not POST).
>>>>
>>>> [1] http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
>>>>
>>>>
>>>> On Tue, Sep 15, 2009 at 11:41 AM, Tommy Pham <tommy...@yahoo.com>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> ----- Original Message ----
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> From: Francisco Barroso (Fortes Informática) <
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> franciscobarr...@grupofortes.com.br>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> To: user@struts.apache.org
>>>>>> Sent: Tuesday, September 15, 2009 8:29:56 AM
>>>>>> Subject: problem with encoding of parameters, type="redirect"
>>>>>>
>>>>>> I just migrated my application from ISO8859-1 to UTF-8.
>>>>>> I have a problem with encoding of parameters. There is an error
>>>>>> passing
>>>>>> a
>>>>>> parameter from xwork to an action using redirect:
>>>>>> ...
>>>>>>
>>>>>> type="redirect">& lt;/result>
>>>>>> ...
>>>>>>
>>>>>> If the parameter name has an special character (such as José), in the
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> action it
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> comes with invalid characters (Jos?).
>>>>>>
>>>>>> Any idea?
>>>>>>
>>>>>> -- Francisco Barroso
>>>>>> Desenvolvedor
>>>>>> Fortes Informática (Fortaleza)
>>>>>> Fone: (85) 4005.1111 - Cel: (85) 8843.8309
>>>>>> franciscobarr...@grupofortes.com.br
>>>>>> www.fortesinformatica.com.br
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> Did you change/set the struts.i8n.encoding in struts.xml/properties?  I
>>>>> don't remember off the top of my head what the default is.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> --
>>> Francisco Barroso
>>> Desenvolvedor
>>> Fortes Informática (Fortaleza)
>>> Fone: (85) 4005.1111 - Cel: (85) 8843.8309
>>> franciscobarr...@grupofortes.com.br
>>> www.fortesinformatica.com.br
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>>
>>>
>>
>>
>>
>
> --
> Francisco Barroso
> Desenvolvedor
> Fortes Informática (Fortaleza)
> Fone: (85) 4005.1111 - Cel: (85) 8843.8309
> franciscobarr...@grupofortes.com.br
> www.fortesinformatica.com.br
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to