struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abhishek jain <abhishek.netj...@gmail.com>
Subject Re: Locale and custom variables
Date Thu, 04 Mar 2010 14:15:58 GMT
On Thu, Mar 4, 2010 at 7:30 PM, Alex Rodriguez Lopez <alopez@flordeutopia.pt
> wrote:

> Em 04-03-2010 05:49, abhishek jain escreveu:
>
> Hi friends,
>>
>> I have a few variables who have diff values depending on the locale /
>> country.
>> I do want to use a message-resources for storing the values of those
>> varaibles,
>> I do not know how to get these variables in my Action (I want them in
>> action
>> and not jsp),
>> Can any one help,
>> I have tried System.out.println(getResources(request,"id2")); after
>> setting
>> a locale and it do not work.
>>
>> Pl. help,
>> --
>> Thanks and kind Regards,
>> Abhishek jain
>>
>>
> Hi Abhishek,
>
> if your Action extends ActionSupport, you can use one of the getText()
> methods to do preciselly this, check
> http://struts.apache.org/2.1.8.1/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html.
>
> We use it this way around here and it works fine (the resource properties
> files being in the same package).
>
> Regards,
>
> Alex


Dear Alex,
Thanks will check that
PS: Will it work for Struts 1.2 as well?
-- 
Thanks and kind Regards,
Abhishek jain

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message