And I highly recommend first doing: response.reset(); if you are using HTTPS. -jaafar
-----Original Message----- From: Hookom, Jacob [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 4:47 PM To: 'Struts Users Mailing List' Subject: RE: How To Render Binary Output - spreadsheet - from Struts Also, you will want to set some headers too: response.setHeader("Content-Disposition","attachment;filename=\"" + fileName + "\""); This will prompt the person to download the file (basically automates the save as). I just finished doing the same thing for a project and we wanted to remove the confusion about what to save and what the file name was, etc. -Jacob Hookom -----Original Message----- From: Michael Remijan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 1:59 PM To: Struts Users Mailing List Subject: RE: How To Render Binary Output - spreadsheet - from Struts Make a servlet call, then set the response content type as response.setContentType("application/vnd.ms-excel"); and then write the contents of the excel spreedsheet the the reponse output stream. If you have a hyperlink on a jsp page that has an href like this: http://localhost/context/do-export-mapping then by setting the content type above will cause excel to open automatically. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]