This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Uploading and Downloading files

 
Ranch Hand
Posts: 77
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I would like to know what is the best way to upload & download files using Servlets/Jsp's . In some websites I have seen example using third party API(by oreilly). Is it better to follow any third party or can we do it just by using I/O streams. Can someone explain the steps of uploading files. And where do we need to store files once the user uploads ,Database or server??

Regards-
Shiva
 
Rancher
Posts: 43011
76
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't use the O'Reilly stuff, it's obsolete. http://commons.apache.org/proper/commons-fileupload/ is a better choice. That site has an extensive user guide with example code that should get you going. And yes - it's better to use an existing solution than to write and debug one yourself.

And where do we need to store files once the user uploads ,Database or server?


You store them wherever it's convenient and makes sense for your application.
 
Shiva Gajjala
Ranch Hand
Posts: 77
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf Dittmer , thanks for the link .I will go through it .
 
Ranch Hand
Posts: 99
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For multiple File upload, you could use Plupload.

Its very friendly and have good docs.

Thanks,
M
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!