File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Download file from database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Download file from database" Watch "Download file from database" New topic
Author

Download file from database

Jacek Marciniak
Greenhorn

Joined: Dec 13, 2011
Posts: 3
Hi,

I have a little problem with downloading file which is stored in database.
I use this code to get file from db, but I receive only page with weired sings.




I can't save it as a file on my computer. File types can be different, ie. .pdf or .jpg.
Server JBoss 5, Seam 2.2.0 GA, JSF 1.2

Thanks in advance for your help
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

JSF is designed to output HTML web pages, not arbitrary text or binary files. Use a servlet for that part of the webapp.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Download file from database