I've got the same issue... the only work-around i found was to specify the
entire path to the file in the web.xml file as an initialization parameter
to a servlet. That obviously doesn't work for .WAR deployments, though.
Anyone else have a better solution? I'd love to hear it.
Jeff
"SPG" <st************@nopoo.blueyonder.co.uk> wrote in message
news:JK*********************@news-text.cableinet.net...
Hi,
I have a servlet application running on tomcat.
I want to write a default config file in the root directory of the
application:
tomcat
+webapps
+myapp
+myConfig.txt
If I use new File(./myConfig.txt), then the file goes to the root of
tomcat. Ither there an easy way to find out the directory of the running app?
Cheers,
Steve