This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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: 17151
    
  27

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


An IDE is no substitute for an Intelligent Developer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Download file from database
 
It's not a secret anymore!