I need to put some settings files in the 'working directory' in order to configure my app.
I have tried puting it in ./WEB-INF/ but did not work, any idea where is the 'working directory'?, and, is it a way to get it programatically?
thanks.
Although I realize you didn't specifically ask this question maybe this will address your real problem ...
Have you considered putting your config files under WEB-INF/classes ? Many configuration files in a web application are loaded as resources, not as "file" objects. If you put your configuration files under WEB-INF/classes they will be available as resources through the ClassLoader.
EDIT: As a side note, there's a slight danger in putting your config files directly under WEB-INF, as they may be exposed to end users by just typing in the correct URL. This depends on other settings in your web container, but it is a real possibility and has happened more than once. Hope you don't do something like keep DB connection info there ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With