Works thanks!
----- Original Message -----
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, October 17, 2003 10:19 AM
Subject: Re: How to retrieve messages from default bundle?
> Something like this should work:
>
> MessageResources resources = getResources(request);
> String msg = resources.getMessage("message.error");
> throw new Exception(msg);
>
> Quoting Barry Volpe <[EMAIL PROTECTED]>:
>
> > Hi,
> >
> > Want to expose a message in my action:
> >
> > In my action I have:
> > throw new Exception("I have an error");
> >
> > want to use message resource:
> >
> > message.error="I have an error" (in applcation.properties)
> >
> >
> > throw new Exception(message.error); (I know this doesn't work
directly)
> >
> >
> > Not sure how to set this up.
> >
> > Appreciate a code example suggestion.
> >
> > Thanks,
> > Barry
>
>
> --
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech <http://www.dotech.com/>
>
> ---------------------------------------------------------------------
> 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]