"Seong Y. Kim" wrote:

> Thanks, Craig.
>
> Sorry that I did not mention it specifically and made you confused.  Here is what I
> am trying to do.  I have a servlet running on NT Server 4.0 with IIS 4.0 and Jrun.
> This servlet will allow the clients to upload files and will have to save those
> files on server side hard drive.  I read the book, 'JAVA Servlet Programming' from
> O'reilly.  This book provide a nice class, MultipartRequest, which does parse
> multipart/form-data.  I could see that the servlet receive uploaded file, but I can
> not save it somewhere in server that the servlet is running.  I am looking for
> specific class that saves file object to server's hard drive.
>
> Thanks again.
>

Open a java.io.FileOutputStream (if the data is binary) or java.io.FileWriter (if it
is character), using whatever pathname you like.  There is no single "save file"
method -- it's just standard Java I/O calls from here, writing bytes or characters
until you run out of data, then closing the output file.

Craig McClanahan

___________________________________________________________________________
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