You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Edgar Dollin <Ed...@BLUE-MOOSE.NET> on 2003/04/30 22:12:32 UTC

RE: RE : How to Add An Additional Resource Bundle

This is one of the issues that stresses me about the error/message system.
The code that is passing the message knows or can get a handle to the
message resources object.  Why not just pass a reference to the resource in
the ActionError.  Instead we have to pass the logical name of a bundle, plus
configure it in the struts-config.xml, plus have the jsp know the name of
the bundle to check for the message.

This just seems like a roundabout way of going about something very simple.
I suppose there is a reason for this that makes more sense.  If someone
could explain why this was designed this way it would be appreciated.

Thanks.

Edgar

> -----Original Message-----
> From: Claudio Parnenzini [mailto:claudio@parnenzini.com]
> Sent: Wednesday, April 30, 2003 10:21 AM
> To: 'Struts Users Mailing List'
> Subject: RE : How to Add An Additional Resource Bundle 
> 
> 
> In your struts-config.xml:
> 
>   <message-resources
> parameter="com.exodis.website.tracking.MyNewApplicationResources"
> key="MyNewRessource"/>
> 
> 
> In your JSP:
> 
>   <bean:message key="prompt.MyKey" bundle="MyNewRessource"/>:
> 
> Regards
> 
> -----Message d'origine-----
> De : Tom Hunter [mailto:curmudgeon99@earthlink.net]
> Envoyé : mercredi, 30. avril 2003 15:14
> À : struts-user@jakarta.apache.org
> Objet : How to Add An Additional Resource Bundle 
> 
> Hey All,
> 
>    I would like to use an additional resource bundle
> (differently named) in the same way that the 
> application.properties bundle is used. Can anyone tell me 
> what I have to configure to achieve that?
> 
> 
> 		\WEB-INF\classes\resources
> 
> 					application.properties
> 					mybundle.properties
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.471 / Virus Database: 269 - Release Date: 10.04.2003
>  
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.471 / Virus Database: 269 - Release Date: 10.04.2003
>  
> 
> 

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