my application using GWT, and I plan to use servlet to export the data in gwt to a text file, but I do not know how to export the data to a text file (with a prompt of save dialog) using servelt, anyone can help?
I see some article said need to use the URL class??
You don't need RPC. Have your servlet stream your file (with properly constructed content type, header etc). Invoke the file as a hyperlink from your client. The save dialog would depend on the browser settings.
Peter, why don't you create the file using normal File class in Java from the RPC servlet and then just store that file in a public location. Once you created the file Just sent that filename as String to the Front end and create a Hyperlink thats it.
I'm gonna teach you a lesson! Start by looking at this tiny ad: