You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Parvez Rishi <ja...@musicurry.com> on 2000/11/22 07:32:49 UTC

can't write to a file form a servlet.

hi,

this is not a tomcat issue...excuse me.

i'm using tomcat and apache 1.3.12 on linux (redhat 6.2).
i cannot get these lines to work in a servlet. Allthough
it works when i run it as a standalone java program.
i think the file permissions are right.

......
......
FileOutputStream fw=new FileOutputStream("test.dat",true);
byte buf[]=name.getBytes();
fw.write(buf);
fw.close();
.......
.......

thanks.
parvez