struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Localice text through hierarchy.
Date Fri, 21 Jan 2011 05:16:27 GMT
I just check the source code, and it does not search on the root folder. That's what caused
the problem. So I move the to a hierarchy common to all my source code and
it worked correclty. Thank you for your info.

Jose Luis
Sent via BlackBerry from T-Mobile

-----Original Message-----
From: Steven Yang <>
Date: Fri, 21 Jan 2011 13:09:12 
To: Struts Users Mailing List<>
Reply-To: "Struts Users Mailing List" <>
Subject: Re: Localice text through hierarchy.

IIRC, LocalizedTextUtil looks for package according to the Class hierarchy.
What I mean is if your MyAction extends Struts' ActionSupport then after
looking a and the in the same package
it will be looking for and in
the same package as ActionSupport, then so on.

So I am not sure if LocalizedTextUtil actually looked for the in com.acme, unless MyAction extends some action or
implements some interface in that package.

Also I dont think it will ever look in the to in your
root unless your action extends some class in there which i doubt.

if you want to make the in root global you should use
"struts.custom.i18n.resources" in or struts.xml

please correct me if i am wrong

On Thu, Jan 20, 2011 at 10:47 PM, JOSE L MARTINEZ-AVIAL <>wrote:

> Anyone has any idea how to avoid this?.
> Thanks
> JL
> 2011/1/17 JOSE L MARTINEZ-AVIAL <>
> > Hi,
> >     I'm using Struts, and I've found an odd behaviour in the way
> > LocalizedTextUtil looks for a text. The situation is a follows:
> >
> >
> > com/
> >     acme/
> >
> >         actions/
> >             MyAction.
> >
> >     So I have two, one at the root directory, and the
> > other one in com.acme. MyAction is trying to use a text defined in the
> first
> > one, but it seems that once LocalizedTextUtil  has located
> >, and not found the text, it doesn't try to go
> up
> > in the hierarchy, and therefore it does not return the text. Is that
> > behaviour correct?
> >
> >     Thanks
> >
> > Jose Luis
> >
> >
> >

View raw message