Well, as I often say, the more JSF-specific code you write, the more likely you're not doing it right. I recommend writing a standard (non-JSF) servlet or JSP when you need to return a non-HTML file to the client.
But the real limitation here is in HTTP itself, not in JSF or J(2)EE.
In HTTP, there is a strict 1-to-1 request/response architecture. You send one request, you get back one response. In this particular case, you send a request for a file, you get back an outputstream containing the file's contents. There's no room in HTTP for also sending back a confirmation message in the same request/response cycle.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.
posted 6 years ago
thanks for the advice..
The problem is, it is already written, i just need to fix it. So any idea on how can I send back a message?