This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

internationalization help!

 
Neeraj Macker
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its so simple but i get java.util.MissingResourceException...why?

my code:
----------------------------

import java.util.*;

Locale currentLocale;
ResourceBundle messages;

currentLocale = new Locale("de");
messages = ResourceBundle.getBundle("MessagesBundle",currentLocale);
System.out.println(messages.getString("greetings"));

the name of my file is MessagesBundle_de.properties

i have adapted the above code for a JSP.thats all. the properties file is in the same directory as is the JSP. why am i getting the exception?
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the properties file in classes directory.
 
Neeraj Macker
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by David Ulicny:
Put the properties file in classes directory.


thanks a million,,this forum rocks...as if i call up my best friend and get help immediately.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic