Hi!
I send a code sample for this problem:
Servlet Containers not support for upload 'multipart/form-data' by
default.
You need to save the ServletInputStream into a file and cut from this
file the original file (or directly from stream).
// ServletInputStream to file
String fileName = "UP" +System.currentTimeMillis()+Math.random();
String absName = "/tmp/"+fileName;
java.io.File uploadFile = new java.io.File(absName);
java.io.FileOutputStream fout = new
java.io.FileOutputStream(uploadFile);
byte[] buf = new byte[1024];
int r = 0;
while ((r = ins.read(buf)) > 0) fout.write(buf, 0, r);
fout.close();
(Sorry, my english is poor.)
___________________________________________________________________________
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