• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting Properties file in MessageBundle

 
Chiranjeevi Kanthraj
Ranch Hand
Posts: 290
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
This is my code

and i am getting the Error


Please tell me how can i give the Base name parameter to the getBundle() method.
And my MessageBundle with all Locale is present in the same directory.
Thanks
 
Lance Miller
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The getBundle() method will look for the desired resource bundle on the classpath. In this case, since the locale you are passing in is "en_US", and you are using "MessageBundle" for the baseName, it searches the classpath for the file "MessageBundle_en_US.properties". If it can't find that file, it will look for a file name "MessageBundle_en.properties". Finally, if it can't find that file, it will search for the default file of "MessageBundle.properties"

Check to make sure your resource bundles are on your classpath or that you are specifying their location as part of the classpath. That is most likely the issue. Also take a look at the Java Tutorial on Resource Bundles Usage.
[ July 21, 2008: Message edited by: Lance Miller ]
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic