File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes How to download a file from a database using jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic
Author

How to download a file from a database using jsp

visu Nekk
Ranch Hand

Joined: Sep 06, 2005
Posts: 122
Can anyone guide with source code of how to download a file from access database using jsp
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41144
    
  45
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.


Ping & DNS - my free Android networking tools app
visu Nekk
Ranch Hand

Joined: Sep 06, 2005
Posts: 122
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
Marshal

Joined: Mar 22, 2005
Posts: 41144
    
  45
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: How to download a file from a database using jsp
 
Similar Threads
how to download a file.......
Download zip or .gz file from server
Using struts 1.2 how to upload a file into database and download it
download zip in jsp
Servlets problem