You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sonu S <so...@gmail.com> on 2009/05/06 10:53:26 UTC

[S2] how to use multiple resource files in struts2

Hi,

I am trying to use two or more resource files in struts2, like this

struts.custom.i18n.resources=Resources1
struts.custom.i18n.resources=Resources2

but it is not working (in JSP pages only values from Resource2 are being
displayed and for keys are being displayed from resource1)

please tell me how to use multiple resource files in struts2

Thanks

Re: [S2] how to use multiple resource files in struts2

Posted by Terry Gardner <Te...@Sun.COM>.
Set multiple resource per line in your struts.xml file, separated by  
commas, for example:

   <constant name="struts.custom.i18n.resources"  
value="globalMessages,Resources1,Resources2" />


On May 6, 2009, at 4:53 AM, Sonu S wrote:

> Hi,
>
> I am trying to use two or more resource files in struts2, like this
>
> struts.custom.i18n.resources=Resources1
> struts.custom.i18n.resources=Resources2
>
> but it is not working (in JSP pages only values from Resource2 are  
> being
> displayed and for keys are being displayed from resource1)
>
> please tell me how to use multiple resource files in struts2
>
> Thanks


Re: [S2] how to use multiple resource files in struts2

Posted by Rodrigo Lins <li...@gmail.com>.
You need to use two differet file for your messages.
One for one value and another for other file.
See internacionalization in struts.

Rodrigo.

On Wed, May 6, 2009 at 5:53 AM, Sonu S <so...@gmail.com> wrote:

> Hi,
>
> I am trying to use two or more resource files in struts2, like this
>
> struts.custom.i18n.resources=Resources1
> struts.custom.i18n.resources=Resources2
>
> but it is not working (in JSP pages only values from Resource2 are being
> displayed and for keys are being displayed from resource1)
>
> please tell me how to use multiple resource files in struts2
>
> Thanks
>



-- 
Rodrigo Lins de Oliveira
21 8610-8297