Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Uploading of files

 
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
 
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
 
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
 
Pay attention! Tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic