Reputation: 9208
I have a *.properties file with some configurations in it, there I have a "file=" key where I need to specify the path to the file. Now, my file is situated in root folder of my web application. How can I specify root of my web application in *.proprietes file?
Something like
file=${root}/file.extension
Upvotes: 0
Views: 1533
Reputation: 16625
When you read your property file in the web application, programatically replace ${root}
with getServletContext().getRealPath("/");
Upvotes: 1