File download using RichFaces

前端 未结 3 1636
渐次进展
渐次进展 2020-12-20 20:59

I got the following to work already:

  1. User can upload a file (i.e. a compressed archive)
  2. User can uncompress the file on the server
  3. User can e
3条回答
  •  有刺的猬
    2020-12-20 21:32

    You don't need the richfaces a4j:commandLink tag for the download, the standard jsf tag h:commandLink would be enough.

    Then make sure you have the following headers set on your response (you can check with firebug in firefox):

    Content-Disposition attachment; filename="your_file_name.xxx"

    Content-Type application/xxx

    Content-Length 1234

    Content-Length: number of bytes.

提交回复
热议问题