I'm trying to read a properties file that is contained in a war file that is deployed under JBoss' Tomcat.
The specifics follow:
code to read file is:
ResourceBundle props = ResourceBundle.getBundle("idmwswrapper.properties", Locale.getDefault(), this.getClass().getClassLoader());
the properties file is currently located in WEB-INF/classes
The error message is:
ERROR READING PROPERTIES FILE.... Can't find bundle for base name idmwswrapper.properties, locale en_US
2007-08-03 15:09:24,265 INFO [STDOUT] java.util.MissingResourceException: Can't find bundle for base name idmwswrapper.properties, locale en_US
2007-08-03 15:09:24,265 INFO [STDOUT] at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)
2007-08-03 15:09:24,265 INFO [STDOUT] at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:726)
2007-08-03 15:09:24,265 INFO [STDOUT] at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)
20 etc. etc.
Where should this file be located relative to the class file that resides
Ideally, I need to place the propertie file OUTSIDE of the classes directory - in config/propetiesfile.properties for instance, but that removes it from the classpath.
Any suggestions are greatly appreciated!