aspose 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

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Download file from database" Watch "Download file from database" New topic

Download file from database

Jacek Marciniak

Joined: Dec 13, 2011
Posts: 3

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: 16883

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:
subject: Download file from database
It's not a secret anymore!