You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bill Ataras <bi...@alwaysonwireless.com> on 2003/06/14 23:16:43 UTC

file/dir creation from servlet wrong?

Running v4.1.24 on winxp.
Using jdk1.4
Installed via the apache installation program
jakarta-tomcat-4.1.24-LE-jdk14.exe


>From within a servlet the following code behaves weirdly:

File fl = new File("blah/blah/blah");
fl.mkdirs();
fl = new File("doh.txt");
FileOutputStream out = new FileOutputStream(fl);


The mkdirs creates the blah tree under the tomcat install dir:

C:\Program Files\Apache Group\Tomcat 4.1

FileOutputStream creates doh.txt under the windows start menu apache
menu:

C:\Documents and Settings\Dad\Start Menu\Programs\Apache Tomcat 4.1

Neither call is given a root dir to start from.




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org