Hi, Craig, James and David, Thank you very much for your replies. I understand the problem now.
I have noticed the MessageResources in struts, however, for my application, I have to maintain two versions of the application, one is the web version and the other is standalone version. One of my software components has its own way to handle message resources, for example, it recognizes &messagebunde.key as a message bundle entry. As I can understand, I should use two sets of message resources in my case, one set of classes subclassing ResourceBundle to use my software component and the other set subclassing/using MessageResources in Struts. Regards, dq ----- Original Message ----- From: "Craig R. McClanahan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, July 15, 2003 4:04 AM Subject: Re: Using ResourceBundle's subclass in Struts > > > On Mon, 14 Jul 2003, David Graham wrote: > > > Date: Mon, 14 Jul 2003 12:22:55 -0700 (PDT) > > From: David Graham <[EMAIL PROTECTED]> > > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] > > To: Struts Users Mailing List <[EMAIL PROTECTED]> > > Subject: Re: Using ResourceBundle's subclass in Struts > > > > --- James Mitchell <[EMAIL PROTECTED]> wrote: > > > On Monday 14 July 2003 03:26, Duan Qiang wrote: > > > > Hi, > > > > > > > > I posted a question but seems nobody replied. > > > > > > That usually indicated a lack of "interest", not a lack of "concern". > > > > > > > Anyone tried to define a > > > > subclass of ResourceBundle and use it in Struts? > > > > > > None that I'm aware of. There are several reasons for Craig's decision > > > not to > > > use ResourceBundle for application messaging when he originally wrote > > > Struts. > > > For more details on that decision, search the archives. > > > > The only reason I can remember is that ResourceBundle is frustratingly not > > Serializable, making it unsuitable for webapp message passing. > > > > That was definitely a problem. But MessageResources in Struts also offers > more facilities than using ResourceBundle directly. In particular, it > does the parameter substitution thing for you in a single call. > > One of the items early on the 1.2.x time frame is to migrate Struts to use > the commons-resources package (currently in jakarta-commons-sandbox). One > of the benefits gained by doing this will be a much easier way to plug in > alternative providers for the message text messages (including a way to > use any ResourceBundle implementation directly), without giving up the > convenience features of having things together in one method call. > > > David > > Craig > > --------------------------------------------------------------------- > 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]