-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jonathan,
Jonathan Mast wrote: > I am writing a report generator that has the ability to generate Excel > files. This question has already been answered by Youssef, Hassan, and Bill. I'm going to add a few things that I think are worth mentioning. There was a magazine at one time called JavaPro that seems to have been wiped off the face of the planet. I have in front of me a printed article called "Send Files to Browser Clients the /Right Way/" which answers your question in a 2-page writeup. The basics are: 1. Use Content-Disposition (as suggested by other responses) 2. Set the Content-Type to application/octet-stream (This may force a download for browsers such as MSIE that would rather show you the content than download it) 3. Make sure you don't send more content than is appropriate. Since you're using a JSP, watch out for excess newlines and stuff like that you might get with sloppy JSP syntax. Sweet. The Way Back Machine comes to the rescue: http://web.archive.org/web/20020604100834/http://www.fawcette.com/javapro/2002_03/online/online_eprods/servlets_03_08/ Enjoy. It's a really old article, but it is actually still correct (which just isn't true for most of what has been published about Java - aside from the basics - since it was introduced). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkkKEcACgkQ9CaO5/Lv0PAPbACffXS7jmqO5m5mX+a9xqrKzs51 8O4AniTQoEYFpvZQTGVyRChPIAHlZI+R =0i+q -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]