Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Servlet I/O – sending a file to the browser

Status
Not open for further replies.

timesign

Programmer
May 7, 2002
53
US
Hi,
I have a doPost method in a servlet. I would like at the end of the method to return a Text file from the hard drive of the server to the user so he can save it.

The text I would like to return is treated in the code as a long string - so if you can tell me how to deliver it to the user as a text file without writing the string to the hard drive of the server, that would be even better.

I presume I want a open | save | cancel, dialog box to appear on the web page.

Thanks,
Jonathan
 
for all those of you who may be curious how to do it the trick is to set the content type to "application/my app"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top