Skip to Content
0
Former Member
Mar 28, 2006 at 12:17 AM

Can't find resource bundle in a dynpage

37 Views

I have a par file which contains an iView. I have externalized the error messages from the iView into a properties file. The properties file is caleld ControllerBundle.properties. When I use following code from the jsp page of the iView, I am able to find the ControllerBundle.properties file. I have copied the properties file in portal-inf/private/classes folder. But if I use the same code from the dynpage doInitiazation() method. I get an error saying "Can't find bundle for base name ControllerBundle". I tried copying the file to lib folder, renaming it to ControllerBundle_en_US.properties but it does not work. Where should I copy the properties file?

String language = "en";

LOG.debug("Language is set to " + language);

String country = "US";

LOG.debug("Country is set to " + country);

Locale currentLocale;

ResourceBundle ErrorMessages;

currentLocale = new Locale(language, country);

ErrorMessages =

ResourceBundle.getBundle(

"ControllerBundle",

currentLocale);