You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eddie Bush <ek...@swbell.net> on 2002/10/02 20:58:23 UTC
Re: message code not working
... which should be revised to: org.apache.struts.Globals.MESSAGE_KEY
or org.apache.struts.Globals.MESSAGES_KEY (I haven't looked to know for
certain what is stored under which, but I bet you're after one of these)
I understand the constants living in o.a.s.a.Action will be deprecated
eventually ...
Taylor, Jason wrote:
>According to source code, the attribute in the distribution I use is
>"org.apache.struts.action.ACTION_MESSAGE", though it seems a bit odd to use
>the syntax you're using.
>
>Why not do
> userInfo =
>((MessageResources)request.getAttribute(Action.MESSAGE_KEY).getMessage("user
>.info.message");
>
>to reap the benefits of encapsulation and compile-time checking of your
>attribute name or
> userInfo = getResources(request).getMessage("user.info.message");
>
>if you happen to be within an Action class already?
>
--
Eddie Bush
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>