Hi,
I am trying to use PropertyResourceBundle in a
jsp file. I am using following code:
<% PropertyResourceBundle res = (PropertyResourceBundle) PropertyResourceBundle.getBundle("test.properties");
// we get text in the same way
String strHello = res.getString("HELLO_TEXT");
String strGoodbye = res.getString("GOODBYE_TEXT");
%>
test.properties file resides in WEB-INF/classes dir. But when I try to run my jsp page I get following error:
java.util.MissingResourceException: Can't find bundle for base name test.properties, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:707)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:604)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:546)
Please help.