How can I do this in Wicket? I'm writing a csv generated file to the output, but I don't know how to tell the client what file name to use. This is what I was using before, is there another way?

getResponse().setHeader("Content-Disposition", "attachment;filename=\"export_" + formatFile.format(Calendar.getInstance().getTime()) + ".csv\"");

############################Code##############################################
                           getResponse().setContentType("text/csv");
getResponse().setHeader("Content-Disposition", "attachment;filename=\"export_" + formatFile.format(Calendar.getInstance().getTime()) + ".csv\""); OutputStream cout = getResponse().getOutputStream();
                           cout.write(out.toString().getBytes());
                           cout.flush();
                           cout.close();

--
Justin Stanczak
Stanczak Group
812-735-3600

"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to