struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: Use MessageResource in taglib
Date Mon, 08 Mar 2004 21:44:45 GMT
On 03/08/2004 08:35 AM Billy Ng wrote:
> Hi folks,
> 
> I need to get a value from the properties file.  I can easily do it in action subclass
with the getResource().getMessage() and in jsp with the bean:message tag.  However, how I
can it in a taglib?
> 


MessageResources resources = (MessageResources)
         context.getAttribute(Globals.MESSAGES_KEY);
String msg = resources.getMessage("my.key");


Adam
-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message