wood burning stoves 2.0*
The moose likes Java in General and the fly likes uploading files using a java application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "uploading files using a java application" Watch "uploading files using a java application" New topic
Author

uploading files using a java application

tarun Mehra
Greenhorn

Joined: May 30, 2001
Posts: 12
hello all,
I am using a swing application to upload files to a server. How do I go about doing this? I am using a JFileChooser to allow the user to select files from his local machine. I have previously used Multipart request for uploading files using a servlet but have no clue for this one.
Please help me.
Thanx in advance.
Tarun.
Juanjo Bazan
Ranch Hand

Joined: Feb 04, 2002
Posts: 231
It depends on what do you have in the server.
If you have a servlet 'waiting' for your files, multipart request will work fine.
If you have a ftp server you may prefer to send the file by ftp protocol..
tarun Mehra
Greenhorn

Joined: May 30, 2001
Posts: 12
hi,
I have a servlet waiting on the server. It creates a new MultipartRequest object. But I have previously used multipartRequest only with an html form that has enctype="multipart\formdata" and action is the servlet that does the processing. How do I do all this within a java application.
Thanx,
Tarun
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: uploading files using a java application