1) If your code does not generate this file I think that you should better put it to Apache server.
2) If your code generates this file you should use h:commandButton(not a4j) and write it into response.
Something like it's desribed here:
Unfortunately there is no such component which helps you to download the file.
You can either 1) -> make a hyperlink to the file (common case) 2) -> point a link to a servlet that will return the file as stream
But we do have jsf component to upload the file namely s:fileUpload.
Thanks to reply
Ilya - when I follow the approach recommended by http://www.coderanch.com/t/212339/JSF/java/Exporting-csv-file-JSF, the file is automatically opened by IE. How do I not lose the page that we are on and present a download dialog box?
You can use window.open(URL_OF_DOCUMENT, '_blank')
The problem with this approach is, the JSF state wouln't be maintained in the URL, so I have requery the database to get the results which I am trying to avoid. If I have to requery then I would accomplish this very easily using a directly servlet mapping instead of going through JSF lifecyle.