The following works:
FileWriter fwrite;
try
{
fwrite = new FileWriter("/usr/local/webserver/tomcat/webapps/myWebapp/conf/" + project + ".conf");
// ...etc.
}
catch(IOException e)
{
// ...etc.
}
But if I change the path in the new FileWriter statement to any of the following, it does not work:
/myWebapps/conf (relative to tomcat's servlets root) conf/ (relative to the docBase declared in the webapp's context) ../../../../conf (relative to the class file)
I get a FileNotFound...(No such file or directory) exception.
What does tomcat consider to be the relative path to the myWebapp/conf directory? relative to what?
BTW, this is a private, internal app that won't be deployed in a public website, so there are no concerns about writing files to the server's disk. But I want to reserve the option of deploying to a Windows machine or keeping it on the Linux box, and I don't want to be tied to a specific directory location on either box.
Thanks.
Jerry
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
