You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by st...@hullegard.com on 2007/08/15 11:47:17 UTC

Problems with multiple resource files (can separate modules be a solution?)

Hi,

I just noticed that we have a problem with our resource files for our site. The
problem is that I don't know how to handle more then one resource file.

We have two different parts of the site that both use resource properties. One
of them (a forum) is build by other persons in our projekt. The other one (a
place where the user can login and purchase things, for instance) is done by
me.
During development I never bothered to create my resource properties file, so
all errors got printed like "??the_error_message_key??". But then I created a
resource file, and then the problems started.

With more then one resource, it seems that I need to specify which one to use.
Is there no way to make it use both? Ie it first looks in one, and then the
other, and so on, until it finds what it is looking for.
I don't want to have to use bundle="some-name" all over the place.

And don't want to have to make the forum guys make changes in their code if not
absolutely necessary.

After searching on google, I'm starting to think that maybe one option is to
divide this into two different struts modules. But it seems like a lot of work,
and even though I have read the struts userguide on modules I still don't
understand exactly how it works. And is it even possible to "move" out the
forum part to a own module withouth changing code in jsp-pages and stuff?

Does anything I wrote here make any sense to you guys? I'm sure I'm going at
this the wrong way, but I don't know what I should do...

All I want is to be able to display messages (mostly errors), have multiple
resource files, and not have to use the bundle attribute.

One solution that I know will work is to put all properties in one big file, but
I really don't like that idea.

Suggestions?

Regards
/Jimi

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org