• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Application Resources.properties file format and uses

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic