thank you all for your reply. now i understand how to do the save-as dialog. But my servlet is using RemoteServiceServlet.
can i just use rpc to receive the response? if no, how to implement httpservlet with remoteserviceservlet? On Feb 12, 2:01 pm, luisfpg <[email protected]> wrote: > Your server should send a request by adding the header "Content- > Disposition: attachment; filename=aaa.csv". > If you set the browser's URL using Location.assign(path), your page > will keep being displayed (because it's an attachment) and there won't > be a new popup on the client browser. > > On Feb 12, 7:41 am, "cyril.lakech" <[email protected]> wrote: > > > You must implement a servlet and then redirect to this servlet with > > this code in your GWT code (buttonlistener.click) > > > String url = GWT.getModuleBaseURL() + "export"; // + "? > > fileToDownload=bob.jpg"; > > Window.open(url, _SELF, ""); > > > And have a look to the search feature of this groupe please !!! > > >http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa... > > >http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa... > > >http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa... > > > etc... > > > On Feb 11, 11:43 pm,ytbryan<[email protected]> wrote: > > > > Hi, > > > > thank you for your reply. > > > > But how do I offer the file as a download? > > > I can create a hyperlink using HTML class. but I want the save as > > > dialog box to be opened automatically. how can i do it? please > > > advice! > > > > On Feb 11, 5:01 pm, Matías Costa <[email protected]> wrote: > > > > > On Wed, Feb 11, 2009 at 4:53 PM,ytbryan<[email protected]> wrote: > > > > > > Hi all, > > > > > > i already created a servlet that make a csv file frommy Resultset and > > > > > save it to a predetermined location. > > > > > > However, i would like the user to choose the location to be stored and > > > > > the name of the csv file. can someone advice me what to do? > > > > > > Do you mean in the client? If so, you can use content-disposition > > > > > header. > > > > > See: > > > > >http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html > > > > > Section 19.5.1 Content-Disposition --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
