You might be able to. Action.getResources() is actually implemented as return ((MessageResources) request.getAttribute(Globals.MESSAGES_KEY));
So try that to get the message resources, then call getMessage() on that. On Wed, 8 Sep 2004 09:59:03 -0400, White, Joshua A (HTSC, CASD) <[EMAIL PROTECTED]> wrote: > Hubert, > > Are you unable to do this from an ActionForms validate method? > > Joshua > > > > > -----Original Message----- > From: Hubert Rabago [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 08, 2004 9:50 AM > To: Struts Users Mailing List > Subject: Re: How to resolve label in ActionMessage? > > The first parameter of the ActionMessage constructor is the message > key. The rest (which are optional), are the actual parameters to the > message. If your parameter is itself in need of evaluation, you'll > need to do that yourself before you pass that on to ActionMessage. > For that, you can call > getResources(request).getMessage("activity.description") in your > action. There are also getMessage() methods that take in a locale and > parameters. > > Hubert > > On Wed, 8 Sep 2004 09:43:00 -0400, White, Joshua A (HTSC, CASD) > <[EMAIL PROTECTED]> wrote: > > Hello all, > > > > The following piece of code appears in my validate method of an > actionForm. > > How can I make work correctly? > > > > errors.add(ActionErrors.GLOBAL_MESSAGE, new > > ActionMessage("errors.required","activity.description")); > > > > where "activity.description" is a key in my messages.properties file, just > > like "errors.required". I would like to have "activity.description" > > resolved to its value. > > > > Regards, > > > > Joshua > > > > This communication, including attachments, is for the exclusive use of > > addressee and may contain proprietary, confidential or privileged > > information. If you are not the intended recipient, any use, copying, > > disclosure, dissemination or distribution is strictly prohibited. If > > you are not the intended recipient, please notify the sender > > immediately by return email and delete this communication and destroy all > copies. > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > This communication, including attachments, is for the exclusive use of > addressee and may contain proprietary, confidential or privileged > information. If you are not the intended recipient, any use, copying, > disclosure, dissemination or distribution is strictly prohibited. If > you are not the intended recipient, please notify the sender > immediately by return email and delete this communication and destroy all copies. > > > --------------------------------------------------------------------- > 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]