struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Lindholm <>
Subject Re: S2 overriding a Localization property
Date Fri, 24 Sep 2010 15:17:06 GMT
Yes, a more explicit override mechanism would be a good idea as the
Bundle Search Order mechanism seems to have some weaknesses.  (This is
all assuming I'm understanding it correctly.)

How would I override properties that are in an class-level properties
file since this seems to be the most specific location?  The only way
I can imagine would be to provide my own version of of class-level
properties with the same name and ensure it is earlier on the
Classpath.  In this case it seems I would have to provide a "full
replacement" with all properties not just the properties I'm
interested in overriding (if it finds my class-level properties file
will it look for others with the same name or just move up the

Here is different situation that also seems weak; if i want to
override a property that is in a package-level properties file I could
provide a  class-level properties file but if the properties are used
by more then one action class I would need to provide multiple
class-level properties files, one for each class that uses the

I think a better mechanism would be a facility to configure a "look
here first" properties file and if not found then continue up the
Bundle Search Order. Essentially allow the developer to insert a
bundle into the front of the search order.

On Thu, Sep 23, 2010 at 5:05 PM, Dave Newton <> wrote:
> Provide a more-specific location--so as long as they can create a package-
> or class-level properties file that's more specific there's no issue. Are
> you looking for a different mechanism than that?
> Dave
> On Thu, Sep 23, 2010 at 5:02 PM, Greg Lindholm <>wrote:
>> How do you override a Localization property that is bundled in a
>> file?
>> I'm planing on bundling up some common Action classes into a jar to be
>> used by several projects. I plan on putting their properties in
>> files that get bundled into the jar.
>> I would like the individual projects to be able to override the
>> supplied properties if they need to. I'm looking at the "Resource
>> Bundle Search Order"  and it appears that it will in the
>> file and if it finds the property it will stop
>> looking any further. So how do you override?
>> Thanks
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message