Re: Setting the name of a downloaded file

2011-02-16 Thread Greg Dougherty
Thanks, it worked! Greg On Feb 11, 10:19 pm, Jim Douglas jdou...@basis.com wrote: public class FileDownloadServlet extends HttpServlet {     @Override     protected void doGet(HttpServletRequest p_request,                          HttpServletResponse p_response)         throws

Setting the name of a downloaded file

2011-02-11 Thread Greg Dougherty
So I have a way to get a Save As Dialog box to come up for the file I'm downloading from my servlet (user hits the Export Button, I create an invisible frame that points to my servlet with the parameters necessary for the servlet to generate the export file). Unfortunately, the file comes up with

Re: Setting the name of a downloaded file

2011-02-11 Thread Colin Alworth
The parameter to set is part of the response from the server - the content-type header can have an attachment property which indicates the name of the file to be used. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group,

Re: Setting the name of a downloaded file

2011-02-11 Thread Jim Douglas
public class FileDownloadServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest p_request, HttpServletResponse p_response) throws ServletException, IOException { String filename = /* ... */; File file = /* ...