I use the input type
                                        <INPUT TYPE="file" NAME="file"/>
along with a hacked about version of the O'Reilly class to let me set
FileFilters to control the file types people want to upload
and it works fine for multiple files

-----Original Message-----
From: Edwards, Peter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 9:31 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Multiple files upload


Lakshmi

If you are using an HTML form to upload the file then you have some
restrictions. The file input element lets you upload one file only and you
cannot script this element (i.e. you cannot dynamically set the value of the
field for security reasons.)

This led us to writing an applet but we couldn't find any easy way of
building a multipart message using the standard java.net package. In the end
we use the java zip capabilities to zip all the required files into a single
file and then sent it using the HTTPClient available at
http://www.innovation.ch/java/HTTPClient/. We could have uploaded the file
to a servlet using the HTTP PUT method but we were sending to a CGI script
that only supported POST and GET so we had to use the multipart message. In
you case a combination of zip and PUT might work.

Pete

-----Original Message-----
From: Adilakshmi Lingam [mailto:[EMAIL PROTECTED]]
Sent: 28 March 2001 21:39
To: Tomcat-User@Jakarta. Apache. Org
Subject: Multiple files upload


Hi,

We need to upload all the files in a directory from the clients machine to
the server.
I've been reading that we could achieve that using the Oreilly's
MultipartRequest object. But I understood that you can do that file by file
only but not all the files if the client selects a directory.

If anyone has experience in uploading multiple files through a servlet, I
would appreciate if you could guide me in the right direction.

I was also considering using FTPClient class in sun.net package. But
couldn't find any documentation for that. Is it advisable to use that? any
thoughts on FTP from a servlet??

Thanks for your help,
Lakshmi

Reply via email to