I have replied to this same thing many times.  If you use modules and simply
don't put any key in the struts config for any of your resources then if you
are in a module's JSP or validate then it automagically knows what module
you are in and gets the one for the module.

Secretly (not really a secret) each modules resource bundle is stored as
<key-name>/<module-name> if you don't provide a module name then it is
simply stored as /<module_name> (I believe) but the important part is that
struts always goes to the right resource per module if you don't specify a
key.  Now the only problem is that there isn't any inheritance of resource
files (at this time) so you would have to copy and past some main resources
(possibly errors.xx etc.) into the modules resource file.

I am using validation, modules, tiles etc. all together playing well.


-----Original Message-----
From: Hariharan [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2003 12:05 AM
To: [EMAIL PROTECTED]
Subject: validator and Multiple resource bundle

Hello friends,

i have already posted this Q. once but never got any reply,
can other atleast tell me what could be a work around for this?


I am trying to use validator with struts 1.1
My idea is to maintain separate resource bundle for each module 
for jsp pages I can give something like this

<bean:message key="registrationForm.email.displayname" bundle="module1"/>
<bean:message key="registrationForm.addr.displayname" bundle="module2"/>

but in case of validation.xml , I just can't specify from which 
resource bundle message should be taken

Eg-
        <arg0 key="registrationForm.email.displayname"/>
        <arg0 key="registrationForm.addr.displayname"/>

Hence it always looks for the key value in the default resource bundle..
there is no way I can tell that "registrationForm.email.displayname"
is in module1 etc...

What could be the solution for this,

Thanks
-Hari


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to