Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Application Resources.properties file format and uses

 
Kris Ten
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on upgrading to Struts 1.3.5 in an application that was already built on some version of 1.1. I'm relatively new to Struts, and I was wondering if anyone could tell me about the ApplicationResources.properties files (message resource bundles, right?). I understand that they contain error messages, both packaged with Struts and application-specific, developer-created. However, is there any special syntax other than the standard

# Comment goes here
element.keyName=Your favorite value {0}, as always

Also, why was I getting warning messages that said that ApplicationResources_en.properties and ApplicationResources_en_US.properties were not found. I know that en is for "English" and US is... well, obvious, but why did I need them? And do I have to copy the code from the basic ApplicationResources.properties file into each of those, or reference that file in some way?

Any insight would be greatly appreciated

Cheers,
Kristen
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, there's nothing special about the ApplicationResources.properties file. It uses the standard rules for a Java ResourceBundle.

The warning message is nothing to be concerned about. All it's saying is that Struts first tried to find a language-specific version of the properties file, and since it didn't find one, it used the default, which is ApplicationResources.properties.

If you want to find out more about how to make language-specific properties files in Struts, see this link.
 
Kris Ten
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help on this and my LocalStrings question. I'm sure there will be more to come

Cheers,
Kristen
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic