I hava a servleta that serves files?
I\'m building a page with a \"Download\" button usung a GWT.
How to make a GWT client download a file in an onClick even
None of the solutions above worked for me, then I realized I already have an implementation working. Here's how I do it:
Window.open(fileUrl, "_parent", "");
But the key is in your servlet:
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
This solution will NOT open new window and instead directly opens the "Save As" dialog. Best of both worlds imo.