the <message> tag, and a few others, have an attribute called "bundle".
That specifies the key to use when looking up a MessageResource class in
application scope, the default being Action.MESSAGE_KEY.  I found the doc to
be a bit confusing, and I began to wonder just how the struts localization
stuff is any better than what Java already gives you by default.

I would have expected that you could configure struts with a set of
localization resources using its config file, but I don't think that's
available.

***What I might do is create a load-on-startup servlet, and place several
MessageResource classes in application scope, then use their keys in my
<message> tags using the "bundle" attribute.  The developer documentation
"util" section will help you out.

I think most people find that the strings they wish to localize are shared
or reused from form to form.  Take a look at any large Java application, and
you won't find too many property bundles.  Usually one per language.  On a
per form basis you're talking # forms times # languages files that have to
be maintained.  Yuk.  I'd rather have very fat resource bundles.

Taylor



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Mark Woon
Sent: Thursday, January 17, 2002 8:07 PM
To: Struts Users Mailing List
Subject: Question: ActionForm specific ApplicationResources.properties?


Hi all...

I've asked this before, and got no response.  But third time's a charm,
eh?  I'd appreciate a quick "this isn't supported" if that was the case
before I started implementing my own custom solution...


Is there a way to have Action/ActionForm specific resources?  Instead of
dumping it all in one ApplicationResources.properties, can I have
multiple .properties files?  I'd like to associate a specific ActionForm
with a specific .properties file, instead of dumping all my resources
into one file.


Thanks,
-Mark

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


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

Reply via email to