tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Ataras" <>
Subject RE: file/dir creation from servlet wrong?
Date Sat, 14 Jun 2003 22:28:56 GMT
Oh yeah, the tomcat icon's "start from" setting is set to:

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

So it looks like FileOutputStream creates files in the dir that
bootstrap.jar is executed from, while the File.mkdirs() function creates
dirs in the tomcat installation dir.

-----Original Message-----
From: Bill Ataras [] 
Sent: Saturday, June 14, 2003 2:59 PM
To: Tomcat Users List
Subject: file/dir creation from servlet wrong?

Running v4.1.24 on winxp.
Using jdk1.4
Installed via the apache installation program

>From within a servlet the following code behaves weirdly:

File fl = new File("blah/blah/blah");
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

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:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message