• Post Reply Bookmark Topic Watch Topic
  • New Topic

Uploading of files

 
Doshi Milan
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends,
I have an application wherein the client will be sending a file to the server. Here the FileDialog box should appear which will help the client to select the file which will then be transfeered to the server for its use.
Should we use FTP?
How do I read and transfer the file?
Thanks in advance,
Regards,
Milan Doshi
 
Bill Siggelkow
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest that you do not use FTP ... basically, it opens your app to problems where people can accidentally delete files, rename, etc. Also, it directly ties your application to the file system. Yes, you can certainly upload files through a web form interface. Just use the <input type="file"...>. Make the action of a form be a servlet. A basic servlet that handles this (what is known as multi-part form data) can be found on Jason Hunter's site at http://www.servlets.com/jservlet2/examples/ch04/index.html#ex04_21
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a free java bean called jspSmartUpload which you can get from www.jspsmart.com which will help you do this.
Jason
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!