Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
    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

How to download a file from a database using jsp

 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Report post to moderator
Can anyone guide with source code of how to download a file from access database using jsp
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Report post to moderator
Can you explain what you mean by "downloading a file from Access"? Last I checked Access was a sort of database (I'm hesitant to call it a full-blown database for various reasons), not a filesystem. Are you talking about retrieving data from it and storing it in a file? In that case, describe more specifically what your problem is - the JDBC part, the file I/O part, or how doing it in a JSP causes you problems.
 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Report post to moderator
i have stored a resume of type .doc in access database.when i retrieve the entire form data i need to download the resume also.i need help in downloading the resume along with other form data.
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Report post to moderator
I'm confused why you want to download "form data", because that is usually uploaded from a web browser to a web server, but since the question is mainly about downloading a file, here goes.
There are two ways to do this. Either, when the user requests the file, retrieve it from the DB, store it temporarily on the web server, and include a link to it on the repsonse page you show to the user. Or, you retrieve the file from the DB and stream it back to the user directly, while taking care to set a proper content type. If you do the latter, there will be no actual response page, so you need to communicate the other data items to the user in a different way.
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic