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/thread/c8b8d2adc4128c6c/aa645788f6a74a1c

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/c90754051fae26b6

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/11b749d50221499e

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to