On Wed, 21 Mar 2001, Ken Beyer wrote:
> Ken Beyer wrote:
>
> > > Anyone have a snippet of a build.xml that's does this "combining" of
> > > the properties files?
> >
>
> I appologize for beating this thread to death, but I want to mention 2
> more things.
>
> 1) I think I found another way to merge multiple
> properties files (if anyone cares :-). I could write my own
> MessageResourcesFactory class and pass that in via the "factory"
> init-param of my web.xml file. My home-grown class could do something
> like merge all properties files found under a directory, and either throw
> an exception on duplicates, or simply ignore repeats.
>
Yes, that is certainly an option.
> 2) Is it possible to change "application" (init-param) to somehow
> suck in a HashMap of MessageResources? Maybe through
> multiple init-params or a properties file containing pointers to other
> properties files. Then I'd call something like getMessage("imagebundle",
> "go.away.button", arg1), or perhaps use a static
> getMessageResourcesByMap("imagebundle"). Also when using struts
> taglibs, when I send - bundle="imagebundle", it would use it as
> a key into the HashMap of MessageResources. Does this sound feasable
> or even needed?
>
I'm looking at something like this to solve the "multiple controller
servlets in one web application" issue, where some large-scale apps need
to be a single web-app (to share sessions), but are constructed in
discrete units by separate development organizations.
The biggest challenge is that the calling sequence is not backwards
compatible. Your earlier approach deals with that one more elegantly.
> Looking at the Struts code, it looks like it might be too much to introduce, but
> just thought I'd mention it.
>
> Ken
>
>
Craig