Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Download file from database

 
Jacek Marciniak
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18272
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF is designed to output HTML web pages, not arbitrary text or binary files. Use a servlet for that part of the webapp.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic