|
Larry, If you find a way that is 100% I'd love to know. We cannot find a way even when sending something like a PDF. We have searched a lot of web forums to know avail. The best you can do is give the browser some "hints" in the headers. There is one where you give it the filename you want to use, I think another where you say it is an attachment, and of course there is the mime type. In general, we have found that if IE feels it can handle the type, it will regardless of what you say. Netscape/Mozilla will generally do what you want. Good luck. Mark To: java400-l@xxxxxxxxxxxx cc: bcc: Subject: Servlet and text/plain "Larry" <larryhytail@xxxxxxxxx> Sent by: java400-l-bounces@xxxxxxxxxxxx 03/19/2003 11:26 AM Please respond to Java Programming on and around the iSeries / AS400 <font size=-1></font> Here's what I think should be a simple question, but I could not find the answer. I have a servlet that generates dynamic content in text/plain format that the end user really does not want to display in his/her browser, but really wants to accept it as a download file. If you click on my link to the servlet, currently it builds the data and displays it in text in the browser. Of course the user could right click and do "save file as" to stream it directly to a file on his/her hard drive, but that is not elegant. How do I make the servlet automatically bring up the save file dialog? Thanks, Larry _______________________________________________ No banners. No pop-ups. No kidding. Introducing My Way - http://www.myway.com _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.