File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Retrieve binary file from database and send to user via web browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Retrieve binary file from database and send to user via web browser" Watch "Retrieve binary file from database and send to user via web browser" New topic
Author

Retrieve binary file from database and send to user via web browser

vamsi nan
Greenhorn

Joined: Dec 18, 2007
Posts: 2
Hello everyone,

My scenario is like this: within MySQL database, i store some binary files in BLOB column. and I have a web application written in JSP with Struts2 under Tomcat 5.5.

I want to know if it's possible to put a button on a form in the web browser, when clicked, the form will make a request back to the database server to retrieve a particular binary file from the blob column and send the file back to the user via the browser.
Pavel Kubal
Ranch Hand

Joined: Mar 13, 2004
Posts: 356
This can be done in conjunction with a servlet. You send a request on a servlet by this button and the servlet retrieves binary response, which it got from a database.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Retrieve binary file from database and send to user via web browser