Omid.. The link must be absolute. You can't just send a file located in a backing bean directly to the browser. The url needs to be a web resource and a backing bean is part of the model layer of Faces MVC Architecture. My advice is to create a servlet whose job it is to stream the file to the browser using the given content type. The link would then reference that sevlet.

Hope that helps...

omidh wrote:
Hi,

can anyone tell me please, how to make a link for a file download?!
The File is saved in a database (Mysql).

so when I use <h:outputLink value="bean.file">
 I get the message that the URL must be absolut.

thansk in advance,
Omid

Reply via email to