Don't rely on relative paths. At any point in time - someone can change the current working directory and throw any preconceived notions way off.

Use absolute paths. Get the base path directory by configuring it in web.xml or server.xml.

-Tim

runu rathi wrote:
Hi all,
I am using the following statement in my .java file

out = new FileOutputStream("responses.txt", true);

I assumed that it should write in a file in the same
directory as the .java file in web-inf/classes

but instead it writes in C:\WINNT\system32

How can I get it to write at a particular place using
relative paths.

I shall appreciate any help.
Thanks,
Runu

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to