aspose file tools*
The moose likes JSP and the fly likes How do I FTP files form my html form using Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How do I FTP files form my html form using "input type=file" through jsp/servlet" Watch "How do I FTP files form my html form using "input type=file" through jsp/servlet" New topic
Author

How do I FTP files form my html form using "input type=file" through jsp/servlet

saurabh shekhar
Greenhorn

Joined: May 01, 2005
Posts: 6
Hi

I am using orilly MultipartRequest to upload files from cliemt to server.But it is very slow . Is there any way of FTPing files from client to server?.

Thanks
Saurabh
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

No.

I've never seen a speed difference between using multipart uploads and uploading with a regular ftp client. You might just have a slow upload rate from your internet provider.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
PRASHANT HEGU
Greenhorn

Joined: May 13, 2003
Posts: 5
There are different package are availble to upload file from client machine to server. if using jsp then refer jsp smartupload lib, if using servelt then try for apache.common under that some fileupload utility is availble.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The library you use doen't matter. They're all on the server.
The browser is what does the upload.
Your connection is going to be the biggest determining factor.
[ May 01, 2005: Message edited by: Ben Souther ]
saurabh shekhar
Greenhorn

Joined: May 01, 2005
Posts: 6
I feel ftp must be faster compared to http. I am using MultipartRequest to upload a 100MB file which is taking hours of time to upload. But if I use a FTP client(WS_FTP) to upload , it is just taking a few minutes. Do you know , how to use FTP from servlet/jsp ? Also do I need to have a FTP server if I am uploading through FTP ?

Thanks
Saurabh
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You would need an FTP server.
You would also need an FTP client because browsers do not allow webapps to access the local file system except via the <input type="file".. control.

I don't think there is an easy way to use FTP from a servlet app.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How do I FTP files form my html form using "input type=file" through jsp/servlet