You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sr...@3com.com on 2006/06/20 15:32:13 UTC

Problem with MessageResources.properties




Hi All,


   I am using struts 1.2.8 , In my MessageResources.properties file i am
using  message key Found {0} records for NewYear's eve (just an example),
this throwing wrong format string exception, when i removed single quote
it's working fine and if there are no argument {0} then also its working
fine.But with two(combination of argument and single quote)  it's giving
the exception , so how i can escape the single quote in above sentence.


Thanks in advance.
Srinivas.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with MessageResources.properties

Posted by Sr...@3com.com.



Thanks for the respone..:) i got the solution , that is the Fix for
Bugzilla #2233..single quote escape charcter is \' with formatKey.





                                                                           
             Monkeyden                                                     
             <monkeyden@gmail.                                             
             com>                                                       To 
                                       "Struts Users Mailing List"         
             06/20/2006 11:15          <us...@struts.apache.org>            
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: Problem with                    
               "Struts Users           MessageResources.properties         
               Mailing List"                                               
             <user@struts.apac                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           




I do this very thing for required field messages and have no problem with
it.  Are you passing the value to the ActionError constructor?

'{0}' is a required field


On 6/20/06, Srinivas_Biragoni@3com.com <Srinivas_Biragoni@3com.com > wrote:
>
>
>
>
>
> Hi All,
>
>
>   I am using struts 1.2.8 , In my MessageResources.properties file i am
> using  message key Found {0} records for NewYear's eve (just an example),
> this throwing wrong format string exception, when i removed single quote
> it's working fine and if there are no argument {0} then also its working
> fine.But with two(combination of argument and single quote)  it's giving
> the exception , so how i can escape the single quote in above sentence.
>
>
> Thanks in advance.
> Srinivas.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with MessageResources.properties

Posted by Monkeyden <mo...@gmail.com>.
I do this very thing for required field messages and have no problem with
it.  Are you passing the value to the ActionError constructor?

'{0}' is a required field


On 6/20/06, Srinivas_Biragoni@3com.com <Srinivas_Biragoni@3com.com > wrote:
>
>
>
>
>
> Hi All,
>
>
>   I am using struts 1.2.8 , In my MessageResources.properties file i am
> using  message key Found {0} records for NewYear's eve (just an example),
> this throwing wrong format string exception, when i removed single quote
> it's working fine and if there are no argument {0} then also its working
> fine.But with two(combination of argument and single quote)  it's giving
> the exception , so how i can escape the single quote in above sentence.
>
>
> Thanks in advance.
> Srinivas.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>