Add /opt/properties
to the common.loader
property of /conf/catalina.properties
file.
Code you posted looks correct to load it, should work with that property in place
سؤال
How can I add a folder to the System ClassLoader classpath so my TOMCAT app find resources?
inside a jar file from a 3rd party lib I have resource been loaded by the code
String resourceName = "MyResource";
ResourceBundle RESOURCE = ResourceBundle.getBundle(resourceName, Locale.getDefault(), ClassLoader.getSystemClassLoader());
in this folder I have the resources
/opt/properties/
MyResource.properties
MyResource_en.properties
MyResource_en_US.properties
المحلول
Add /opt/properties
to the common.loader
property of /conf/catalina.properties
file.
Code you posted looks correct to load it, should work with that property in place