You need to make an other ajax call after the file is created.
From the RPC call send back to the client the url pointing to the newly
created file, and:

static native void downloadFile(String url) /*-{
   $wnd.open(url,'Download');
}-*/;

Ml,
fenyoapa

----- Eredeti üzenet ----- From: Akis
Sent: Monday, May 28, 2012 5:26 PM
To: Google Web Toolkit
Subject: GWT and HttpServletResponse

Hi guys. I've got a question for you:

i need to create a web app which, starting from an input string given
by the user through the browser, generates a file that has to be
downloaded by the user self.

My approach would  be the following: the input string is sent by a RPC
to a server-side class that creates the file from the given string,
and then the file is sent to the client-side, ready to be downloaded.

Now, in "classic servlet way", i would use a HttpServetResponse to set
the header, the content type, and attach the file... how can i do this
with GWT?

Thank you mates!

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google 
Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to