Without getting into implementation issues, the important thing to note is that Struts uses the same MessageFormat class and follows the same rules for loading a bundle. From a application development standpoint, you won't know the difference. Any bundles you can use with ResourceBundle you can use with MessageResources (and vice versa).
There are some discussions about a JDBCMessageResource class happening on the DEV list. If you are interested in the underlying implementation, you might stop in there. As noted, some parts of Struts predate what is now available. If the JSTL had been out two years ago, most of the taglibs would never had been written. If filters had been available sooner, the control layer would also be different. (And may be, post 1.1) But as standards become available, you can expect Struts to fall in line. As a volunteer project, we don't always have the resources to make sweeping internal changes to the codebase, but you can expect the top-level APIs to be compatible. As they are between MessageResources and ResourceBundle. -Ted. K.Viswanathan wrote: > > I am asking about general programming. I'd like to know What are the > advantages of MessageResources/PropertyMessages of struts.util over the > ResourceBundle ( and other related classes )of java. > > > Excerpts from Chuck Cavaness's book ( chapter 3) : > The Java library includes a set of classes to support reading message > resources from either a Java class or a properties file. The core class in > this set is the java.util.ResourceBundle. The Struts framework provides a > similar set of classes, based around the > org.apache.struts.util.MessageResources class that provides similar > functionality, but provides for a little more flexibility that the framework > requires. > > The standard Java support for Internationalization has grown with the past > several releases and the Struts framework could probably use what's included > with 1.2 and newer, but since Struts was created before 1.2, they had to > build in their own support for several key pieces. ..... > > Chuck Cavaness's book ( chapter 12)states that > > "The Struts framework does not use the ResourceBundle provided by the core > language. Instead, it provides similar functionality with the classes within > its framework. The org.apache.struts.util.MessageResources class and its > only concrete subclass, org.apache.struts.util.PropertyMessageResources, are > used to perform parallel functionality to that of the ResourceBundle > hierarchy. .." > > Thanks > Vishy > > > > > > > ----- Original Message ----- > From: "Michael" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > Sent: Wednesday, September 04, 2002 6:14 PM > Subject: RE: i18n > > > >>I'm not sure what you mean. Are you talking about general programming >>or for HTML pages generated with a struts application? For the latter, >>you do not need to use thoses classes, struts does it all for you. >> >> >>>-----Original Message----- >>>From: K.Viswanathan [mailto:[EMAIL PROTECTED]] >>>Sent: Wednesday, September 04, 2002 1:56 PM >>>To: Struts Users Mailing List >>>Subject: Re: i18n >>> >>> >>> >>> >>>Yes. Tag libraries are useful but what I wanted to know is >>>what are the >>>advantages of using MessageResources, >>>PropertyMessageResources etc . >>>We can define simple .properties files for every locale and >>>use ResourceBundles to get the data inside the message tag. >>>Are there any advantage of using the classes mentioned above? >>> >>>Thanks >>>Vishy >>> >>>----- Original Message ----- >>>From: "Michael" <[EMAIL PROTECTED]> >>>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> >>>Sent: Wednesday, September 04, 2002 4:59 PM >>>Subject: RE: i18n >>> >>> >>> >>>>>I'd be happy if anyone could clarify my basic doubt >>>>> >>>related to i18n >>> >>>>>. I'd like to know what are the added features related to I18n >>>>>implemented in Struts over the one already supported by >>>>> >>>java? what >>> >>>>>are the advantages of >>>>> >>>org.apache.struts.util.MessageResources ( and >>> >>>>>other related >>>>>classes) over ResourceBundle? >>>>> >>>>With struts you can use the >>>> >>>><bean:message key="base.title"/> >>>> >>>>To get the text out of a resource properties file. Struts will use >>>>the locale defined in the user's browser preferences. >>>> >>>>Michael >>>> >>>> >>>> >>>> >>>>-- >>>>To unsubscribe, e-mail: >>>> >>><mailto:[EMAIL PROTECTED]> >>> >>>>For additional commands, e-mail: >>>> >>><mailto:[EMAIL PROTECTED]> >>> >>> >>>-- >>>To unsubscribe, e-mail: >>><mailto:struts-user-> [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]> > > -- Ted Husted, Husted dot Com, Fairport NY US co-author, Java Web Development with Struts Order it today: <http://husted.com/struts/book.html> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>