tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Teutsch <>
Subject file reading and writing
Date Wed, 04 Apr 2001 03:45:29 GMT
I am trying to control some file reading and writing. I'm trying to 
transition some servlets from QuidProQuo, and the primary difficult I am 
having is figuring out how to read and write a file. I've tried to debug 
everything I can think of, mostly the permissions on all the work 
directories (localhost_8080* all set to rwx). Getting accustomed to OS 
X, I know that permissions can be a big sticking point. Although it 
could be something else completely, despite the error.

Here's the code I am trying in a simple servlet.
DataOutputStream fileOut;
fileOut = new DataOutputStream( new FileOutputStream("output.txt"));
A call to 

And the servlet catches the exception: output.txt (Permission denied)

So, where does the servlet store things it wants to access? I'm just 
looking for something simple here, until I have the time to learn jar 
file access in general. Hopefully I'm just missing something in the 
development or config docs.

Brian Teutsch

View raw message