Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

uploading files using a java application

 
tarun Mehra
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic