tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <>
Subject Re: [OFF TOPIC] ServletOutputstream Issue
Date Mon, 14 Apr 2003 17:29:51 GMT

Lior Shliechkorn wrote:
> Hi, I'm trying to use POI as a utility to generate a report in excel. The process to
generate the report is as following (IIS5 & Tomcat 4.0.5): 1. JSP page with a form2. Servlet
to pass the req, res to another servlet (appropriate report)3. Servlet (1. for HTML view and
2. for Excel view) I have no problems except when I try to get the file to be opened or saved
on the client side it's trying to open/save the servlet at step 2. It's not prompting to save
an xls file or open one, and I'm getting an error of site unavailable and the download fails.
Any help would be great with this, since I'm obviously missing something about the outputstream.
Again, thanks for taking the time to review my question, Lior

How does your servlet serve the Excel file?  I am assuming that you are 
using POI to write directly to the ServletOutputStream, obtained with 
response.getOutputStream()?  If I am not mistaken you may need to set 
the content-type of the outgoing response:



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message