• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to download a file in servlet  RSS feed

 
Swaroop Reddy
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am uploading a file to the oracle DB using Oreilly package ,now my problem is how to retrieve it and store it in local PC .I want the file to be downloaded as it was before i uploaded.can you please send the code for downloading and saving it to local system.

If any similar links also please let me know,

Thanking you
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the SimpleStream example in the http://faq.javaranch.com/java/CodeBarnServlets. It demonstrates how to stream a file from a servlet.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or this -more complete- example: http://balusc.blogspot.com/2007/07/fileservlet.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!