• 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

what is applicationResources. properties

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see ApplicationResources.properties referenced everywhere, but when I google it, I can't find what it is or how to define it. I am assuming that this is what defines it in the web.xml:

If there is no directory in front it, does it go in the WEB-INF directory? I have the struts download and I don't see an ApplicationResources.properties in any of the .war samples?

Where can I find documentation on how to put data into this file and what the standards also about how to use it in the application?
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd think this might be a naming convention by your developer group. Try to determine where/how this file is read.
 
Ranch Hand
Posts: 4864
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the xml you show is not required to configure the current version of Struts. It may be a remnant from an earlier version.

Currently, the ApplicationResources.properties file is the default name given to the file used to retrieve messages based on message keys. However, you can name this file anything you want. It's configured in the struts-config.xml file as follows:

<message-resources parameter="com.mycompany.resources.ApplicationResources"/>

This means that struts will look for ApplicationResources.properties in the directory myApplication/WEB-INF/classes/com/mycompany/resources

If you're using the internationalization feature of struts, you may also have other files such as ApplicationResources_de.properties, ApplicationResources_fr.properties, etc. for different languages.

The reason you don't see this file in any of the Struts examples is that they've configured their file name as MessageResources instead of ApplicationResources.

See this link for further information on this file and how it relates to Struts internationalization.
 
reply
    Bookmark Topic Watch Topic
  • New Topic