wood burning stoves 2.0*
The moose likes JSF and the fly likes problem with displaying file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "problem with displaying file" Watch "problem with displaying file" New topic

problem with displaying file

sneha patil

Joined: Feb 15, 2012
Posts: 15
I am working with primefaces....i want to download a file...
my web page code

and inside FileDownload method

an setter and getter for doument file...

but it is not displaying file....

please help me out..

Thanks in advance..
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15959

Using JSF to download a PDF is like using a screwdriver to hammer nails. It doesn't work very well.

JSF is an HTML form-assistive technology and it handles HTML forms very well indeed. But for non-HTML data such as spreadsheets, images, XML files and PDF's, you should use a non-JSF solution. JSF is not a "Master Control Program" that has to be used to handle every URL request sent to a web application. For non-HTML output, use a plain old servlet or JSP.

Customer surveys are for companies who didn't pay proper attention to begin with.
jQuery in Action, 2nd edition
subject: problem with displaying file
Similar Threads
How to store a particular data into project file
JSP: DownLoad a file
Trouble updating primefaces component w/ajax
File Not Found Exception in IO Stream