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]

Reply via email to