I've had my fair share of fun trying to use getResourceBundle
to load a
properties file and made basically the same discoveries you have. The
properties file say bar.properties gets loaded as
ResourceBundle.getBundle("org.foo.bar") and must be in
WEB-INF/classes/org/foo/bar.properties.
It is also standard behavior of Java with respect to class paths, and is
not specific to Tomcat. Resource bundles have to follow the same
directory structure rules as a class named org.foo.bar would.
It WAS in the same directory structure, as my post pointed out. The
resource bundle IS in
Does it work in the command line tests under both Linux and
Win2K? I just want to make sure the JDK itself is ruled out.
Personally, we've run into instances where regular .properties
files aren't found under Tomcat if they're in WEB-INF/classes;
but if we put them in a package directory
First off, if the following has an answer that's been posted before, my
apologies. I searched the archives (and the Web in general) and didn't get
any hits. Really. I swear! :-)
I am going to try and be as detailed as possible, because it appears that it
COULD be a Tomcat bug, since the behavior
I have only one guess: you've got the wrong package (or no
package) in your
ListResourceBundle implementation,...
No - I just double-checked that, and it's the same package (correctly
spelled :-).
Remember:
1) It works when the class unit tests are exercised on the command line.
2) It