File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes It seems strange in MessageResourse.properties file... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "It seems strange in MessageResourse.properties file..." Watch "It seems strange in MessageResourse.properties file..." New topic
Author

It seems strange in MessageResourse.properties file...

Bhavesh Sangwan
Ranch Hand

Joined: Aug 08, 2012
Posts: 57
O Hi...

look on this code in my messageResourse.properties file..

Is not it strange...
What is the meaning of {0} here .. what if I write {1} instead...

please explain

Thanks
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1761
    
    7

That is, most likely, a parameter that is replaced dynamically. It's pretty common to define resources like this in a .properties file, retrieve them using a PropertyResourceBundle and then us the MessageFormat (<-click) class to replace the parameters with desired String fragments.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
 
Consider Paul's rocket mass heater.
 
subject: It seems strange in MessageResourse.properties file...