My app is a Web application, employs Spring, Apache CXF, ... and is deployed on Tomcat-7.
In META-INF\context.xml I specify an additional class-path element
At initialization time, it loads up a property file, (using PropertyPlaceholderConfigurer)
from within the jar/ war as well as from the file system (if found in the additional class-path)
For this I have used the following
The logs specifically say;
Loading properties file from URL [jar:file:/D:/WMSandbox/tools/apache-tomcat-7.0.40/wtpwebapps/Myserver-web/WEB-INF/lib/Myserver-1.0.0-SNAPSHOT.jar!/myConfig.properties]
Loading properties file from URL [file:/D:/opt/xyz/config/myConfig.properties]
But the path(s) are (is) only getting printed in the log.
At run time, I need the exact file:/ path in a variable - how can I get that?
Using
gave me only the exact paths of the jar's used by my application but not the file:/ path of the property file (loaded from the file system/ outside the .jar)
Any clues, how I can get the full path of the property file (loaded from the file system)
Thank you
g1
In META-INF\context.xml I specify an additional class-path element
At initialization time, it loads up a property file, (using PropertyPlaceholderConfigurer)
from within the jar/ war as well as from the file system (if found in the additional class-path)
For this I have used the following
The logs specifically say;
Loading properties file from URL [jar:file:/D:/WMSandbox/tools/apache-tomcat-7.0.40/wtpwebapps/Myserver-web/WEB-INF/lib/Myserver-1.0.0-SNAPSHOT.jar!/myConfig.properties]
Loading properties file from URL [file:/D:/opt/xyz/config/myConfig.properties]
But the path(s) are (is) only getting printed in the log.
At run time, I need the exact file:/ path in a variable - how can I get that?
Using
gave me only the exact paths of the jar's used by my application but not the file:/ path of the property file (loaded from the file system/ outside the .jar)
Any clues, how I can get the full path of the property file (loaded from the file system)
Thank you
g1