Craig R. McClanahan wrote:
>
> "Seong Y. Kim" wrote:
>
> > Thanks, Craig.
> >
> > 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.
The MultipartRequest class saves the files to the filesystem itself,
into whatever directory you specify in its constructor. I don't see
where a FileOutputStream would be necessary in this case. Seong, if
you can't save to some directory it may just be write permission
problems or something.
-jh-
--
Jason Hunter
[EMAIL PROTECTED]
Book: http://www.servlets.com/book
Article: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.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