I use primefaces and I want to download a file with different formats(pdf, jpg, png, ) from database but I don't succed to realise this I have seen a lot of topic like this but their methods don't work for me here is the html :
JSF is designed to work with HTML, not PDF, MS-Word/Excel files or other non-HTML data.
Instead of trying to force JSF to output stuff it wasn't intended to output, you'll find it's cleaner to use a JSF h:outputLink element to reference a servlet URL. Let the servlet handle outputting the special-format data.
Sometimes the only way things ever got fixed is because people became uncomfortable.
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth