James Mitchell wrote:
> 
> Let's bounce this on the dev list.
> 
> Struts gurus, this was in response to someone (I doubt that I'm the only
> one) asking about having the resource bundle loaded from xml file(s).
> 
> (and yes....I'm well aware of the "thanks for volunteering" approach to
> requests for enhancements ;)
> 
> Is this ok for pursuing further?

The place to pursue additional work on the MessageResources would be in
the Commons. If someone has a patch that will put it into release state,
the best place to submit that is Bugzilla, where it won't get lost.
Perhaps that would mean it could be elevated out of the sandbox,
released from the Commons proper, and the Struts dependancies adjusted
accordingly. 

But, since you can also specify your own MessageResourceFactory, it is
not even strictly necessary to push all the changes through the Commons.
If you need it, implement it, and plug it in =:0)

It's important to recognize that a good number of enhancements to Struts
came from components that developers distributed on their own first. 

Whenever there is anything that anyone wants in the Struts distribution,
or any Jakarta product, the best thing is to just develop it, get some
other people to use it, and then nag us until we adopt it.

I'm not saying this is the most efficient approach, but it's one that's
known to work =;0)

-- Ted Husted, Husted dot Com, Fairport NY US
-- Java Web Development with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


> What kind of priority would it be?
> 
> Personally, I'd also like to be able to load the resources from a JDBC
> source.
> 
> Your thoughts?
> 
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://struts-atlanta.open-tools.org
> 
> > -----Original Message-----
> > From: Tero P Paananen [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 19, 2002 6:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: MessageResources
> >
> >
> > > Would you care to donate the source for the cause?
> >
> > James,
> >
> > Got a major deadline over and done with today, so I
> > got some time.
> >
> > Here's how the XMLMessageResources.java will work:
> >
> > The XML content files follow Interwoven's dcr4.5.dtd
> > DTD, which is the default DTD for content exported into
> > XML files from Interwoven. The format is as follows:
> >
> > <record type="content" name="Name for the XML file">
> >       <item name="message.key">
> >               <value>message value</value>
> >       </item>
> >       <!-- multiple items -->
> > </record>
> >
> > The current implementation has four java classes:
> >
> > XMLMessageResources.java
> > XMLMessageResourcesFactory.java
> > LocaleXMLFilenameFilter.java
> >       - FilenameFilter that returns a list of XML files
> >         that contain messages for the given locale
> > XMLUtils.java
> >       - the XML parsing routines. Uses Digester to parse
> >         the XML files into Properties objects
> >
> >
> > XMLMessageResources extends PropertyMessageResources and
> > overloads the loadLocale() method to read XML files instead
> > of .properties files.
> >
> > XMLMessageResources will read messages from multiple XML
> > files and the messages can be specified in as many XML files
> > your operating system will allow you to have. This means
> > that you can easily group your messages in logical groups:
> > errorMessages.en_US.xml, login.en_US.xml, logout.en_US.xml,
> > etc. without having to specify that stuff anywhere in your
> > application.
> >
> > The current implementation reads files from one directory,
> > but I'm thinking to change that to read them from locale
> > specific directories:
> >
> >       /WEB-INF/messages/en_US/errorMessages.xml
> >                               login.xml
> >       /WEB-INF/messages/en/errorMessages.xml
> >                            login.xml
> >
> > I think that's a better way to organize the files. And it
> > would also get rid of some of the sillyness in
> > LocaleXMLFilenameFilter.
> >
> > That's pretty much it.
> >
> > We also developed on-the-fly message resources reloading
> > the Struts framework could use, unless it's already in
> > the 1.1 version.
> >
> > Sound good?
> >
> >                               -TPP
> >
> >
> > > > -----Original Message-----
> > > > From: Tero P Paananen [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, June 10, 2002 5:57 PM
> > > > To: Struts Users Mailing List; [EMAIL PROTECTED]
> > > > Subject: RE: MessageResources
> > > >
> > > >
> > > > > I agree, in fact, I wonder if it can be extended to load from
> > > > > other means
> > > > > such as xml, rdbms, or call to a url (ftp/http/whatever)
> > > >
> > > > We implemented XMLMessageResources.java on our current
> > > > project.
> > > >
> > > > Interwoven had problems getting stuff into .properties
> > > > files, so we had to read XML files instead.
> > > >
> > > > The implementation was so remarkably easy that it felt almost
> > > > like cheating :)
> > > >
> > > >   -TPP <- likes frameworks that make my life easier
> > > >
> > >
> >
> 
> --
> 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]>

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

Reply via email to