Here's one approach (I believe this is called the "brute force" method).
Where you're trying to read a file, write one instead. Don't specify a path,
and give it a funny name. Then search your system and see where it turned
up. The config file goes right next. It may not seem like the most
convenient or intuitive location, probably somewhere deep in the bowels of
your application server, but it should at least be consistent.
BTW you may find some interesting logs there. It's a bit like playing
ADVENT.
Hope this helps,
Dave
Hi,
I have a web service which needs to read a property from a configuration
file, but I can't work out where in the webapp to put the configuration
file so the web service implmentation class can read it. I've tried
putting it in WEB-INF/classes, in the root directory of the web app, in
WEB-INF, in the same directory as the class which reads it, and in pretty
much every other directory you can think of, but I keep getting a
FileNotFoundException.
If I hard code the full path to the file (C:/..... on Windows or
/home/richard...... on Linux) in my service it can find and read it, but
this isn't really an option as the service will be deployed on different
machines by different customers so the path will vary.
If anyone can give me some suggestions I'd be grateful.
Thanks,
Richard.