what exactly do u want? do u want a download functionality? u just cant
write any file to the clients machine without the rights being given to u.
could u be restate your problem a bit more clearly.

regards,
Abhishek BasuMallick
Cisco Projects
ZenSar Technologies Ltd.
--------------------------------------
What a great time to be a nerd !!
--------------------------------------


-----Original Message-----
From: Tiana Zhang [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 2:34 AM
To: [EMAIL PROTECTED]
Subject: Help:How to save file on client's side


Hello,

I created a servlet and hosted it on my machine. One of the functions of
this
servlet is to save an output generated by the servlet to a client's machine.
In my servlet, when user enter the directory which he/she wants to save the
file(e,g C:\temp\), the file will be saved in that dir.

The weird thing is that file has been saved in my machines instead of the
client's local box. Can anyone tell me how to fix it?

The code to save the file is:

public boolean saveInfoInText(String line, String filename, PrintWriter pw)
{


        File f = new File(filename);
        FileWriter out = new FileWriter(f);

        out.write(line);
        out.flush();
        out.close();
}

Thanks very much
Tiana

___________________________________________________________________________
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

___________________________________________________________________________
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