struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adolfo Miguelez" <pell...@hotmail.com>
Subject Re: Message Resource Bundle from an action
Date Mon, 03 Feb 2003 14:57:56 GMT

An snip of my code for Struts 1.0.2

String mensaje = "";
MessageResources resources = (MessageResources) 
servlet.getServletContext().getAttribute(Action.MESSAGES_KEY);
if (resources == null)
     	mensaje = "fichero de propiedades no encontrado";
else mensaje = resources.getMessage(getLocale(request), e.getMessage());

System.out.println(mensaje);

I guess for Struts 1.1b* would be quite close

Adolfo








>From: "Pat Quinn" <pat_quinn2009@hotmail.com>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: struts-user@jakarta.apache.org
>Subject: Message Resource Bundle from an action
>Date: Mon, 03 Feb 2003 14:50:10 +0000
>
>hi guys,
>
>Anyone know how i can access the message resource bundle from an action 
>class??
>
>Cheers
>
>Pat
>
>
>
>
>
>_________________________________________________________________
>Tired of spam? Get advanced junk mail protection with MSN 8. 
>http://join.msn.com/?page=features/junkmail
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org


_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


---------------------------------------------------------------------
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