I am trying to send a downloaded word document through a jsp.  When the
document is bigger than about 20K, part of it is missing.  Can't tell
whether it's the end or the beginning that is getting cut off.

The junk.getDoc() return a string that's just the reading of a file
input stream.  The strange thing this is that if I create a file in the
jsp and the write the results of getdoc to the file, the correct file is
saved to disk.  Only when the result is spewed through http does it get
hosed.

I have also tried changing the getDoc to return an array of bytes and
trying to morph that back into a valid file but I failed.

Here's the code.  I've tried multiple permutations of commenting out
and/or changing the first two lines.

<%
    response.setHeader("Content-Disposition", "inline;
filename=word.doc");
    response.setHeader( "Content-type", "binary/octect-stream");
    String myWordDoc = junk.getDoc();
    out.print ( myWordDoc );
%>

--
------------------------------------------------------
Eric Butler
(VP Product Development & Founder)
MDinTouch, Inc.
786.268.1161
http://www.mdintouch.com
[EMAIL PROTECTED]
------------------------------------------------------

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to