You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Guido <gu...@ribera.tel.uva.es> on 2003/03/11 10:43:30 UTC

Message replacement

Hello

Anyone can explain me (for dumbs) how does this replacement works 
(Action sample code would be great) and what Java classes are involved?

error.number=The number {0} is greater than {1}

Thank you!
Guido.


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


[OT]Re: Message replacement

Posted by Guido <gu...@ribera.tel.uva.es>.
Thank you. The idea was use only Java "standard" classes (or at least 
commons packages), not Struts dependent ones.

Maybe I can use java.text.MessageFormat I have seen at

http://java.sun.com/products/jdk/1.2/docs/api/java/text/MessageFormat.html

Regards,
guido.

James Mitchell wrote:
> You can find sample code in many places including the struts-example
> that ships with the software.
> 
> The classes involved are as follows:
> org.apache.struts.util.MessageResources.java
> org.apache.struts.util.MessageResourcesFactory.java
> org.apache.struts.util.PropertyMessageResources.java
> org.apache.struts.util.PropertyMessageResourcesFactory.java
> 
> In the future (1.2) we will be changing this to use commons-resources,
> which basically does the same thing.  



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


RE: Message replacement

Posted by James Mitchell <jm...@apache.org>.
You can find sample code in many places including the struts-example
that ships with the software.

The classes involved are as follows:
org.apache.struts.util.MessageResources.java
org.apache.struts.util.MessageResourcesFactory.java
org.apache.struts.util.PropertyMessageResources.java
org.apache.struts.util.PropertyMessageResourcesFactory.java

In the future (1.2) we will be changing this to use commons-resources,
which basically does the same thing.  


--
James Mitchell
Software Developer/Struts Evangelist
http://struts.sourceforge.net/struts-atlanta/



> -----Original Message-----
> From: Guido [mailto:guigar@ribera.tel.uva.es] 
> Sent: Tuesday, March 11, 2003 4:44 AM
> To: Struts Users Mailing List
> Subject: Message replacement
> 
> 
> Hello
> 
> Anyone can explain me (for dumbs) how does this replacement works 
> (Action sample code would be great) and what Java classes are 
> involved?
> 
> error.number=The number {0} is greater than {1}
> 
> Thank you!
> Guido.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


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