Hi!

        I too would suggest to use some writer class from the java.io
package.
I personally like PrintWriter.
        But i think on Your system (Solaris) your problem is that the
webserver (Apache)
is running as a user (usually nobody) and you are trying to write in a file
that You don't have
permisssion to write. A solution would be to change the permisions of that
file like this:

chmod 666 filename

           This solution would be only for testing that the problem is
really with accessing the file or
something else. I strongly advise You to talk with the System Admin of Your
server and set a user
(or create a new one ex. www) to the Apache (in httpd.conf file) and than
every file that Your are
handling within the servlets should belong to that user.

p.s. I think this will help a little bit.

If not please fill free to ask and send some source code too.


Best wishes,
                Andras.


----- Original Message -----
From: sajida kalsoom <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 29, 1999 2:04 PM
Subject: How to write in a file from servlets


> Hello users;
>   can some body tell me, is there any way to save data in a file from
> servlet at server machine running  servlets . I have tried to save data in
> random access file but servlet throws java.io.IOException
>
>     I am using apache 1.3.3 Jserv 1.0b3 on  Intel solaris 7
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to