This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line! See this thread for details.
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.
Do not set lab on fire. Or this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop