Alterar no nome do arquivo de download com struts 2

0 respostas
Flavio_machine

To tentanto mudar dinamicamente o nome do arquivo que vai fazer o download.

ja tentei fazer isso aqui na action mais não deu certo não

HttpServletResponse response = (HttpServletResponse) ActionContext.getContext().get(ServletActionContext.HTTP_RESPONSE);
response.setHeader(“Content-Disposition”, “attachment; filename=”" + “ddd.doc” + “”" );

Usei esse tutorial aqui

http://www.mkyong.com/struts2/struts-2-download-file-example/

Criado 8 de fevereiro de 2012
Respostas 0
Participantes 1