S
Scott Harper
I have a servlet running under Tomcat. I'd like to load a
ResourceBundle that resides outside the servlet's context (directory).
I know how to get it from WEB-INF/classes:
ResourceBundle.getBundle("Basename", locale);
and I know how to get it out of some deployed package directory,
relative to WEB-INF/classes:
ResourceBundle.getBundle("com.company.package.Basename", locale);
But I was hoping I could load it from a directory that is not in the
webapp context -- for example, /opt/local/config/Basename.properties.
I tried the following two permutations, but both throw
MissingResourceException:
ResourceBundle.getBundle("/opt/local/config/Basename", locale);
ResourceBundle.getBundle(".opt.local.config.Basename", locale);
I suspect that I need to somehow get /opt/local/config on my classpath,
but not sure if that is it or not...
Anyone seen anything like this before?
thanks
scott
ResourceBundle that resides outside the servlet's context (directory).
I know how to get it from WEB-INF/classes:
ResourceBundle.getBundle("Basename", locale);
and I know how to get it out of some deployed package directory,
relative to WEB-INF/classes:
ResourceBundle.getBundle("com.company.package.Basename", locale);
But I was hoping I could load it from a directory that is not in the
webapp context -- for example, /opt/local/config/Basename.properties.
I tried the following two permutations, but both throw
MissingResourceException:
ResourceBundle.getBundle("/opt/local/config/Basename", locale);
ResourceBundle.getBundle(".opt.local.config.Basename", locale);
I suspect that I need to somehow get /opt/local/config on my classpath,
but not sure if that is it or not...
Anyone seen anything like this before?
thanks
scott