Use a FileInputStream instead of a FileReader to read the file, and from
your servlet, call getOutputStream instead of getWriter. You almost had it
except for the fact that you were using readers and writers.
Mark
On Thu, 30 Nov 2000, Sanjay Gomes wrote:
> Hi Thomson,
> Well What I want to do is display a document on the server .But I dont want
> the URL to be displayed for security purposes, that is why I want it to be
> gone thro a servlet. Oherwise it is very easy since If I do a simple
> redirect to the file thro a JSP,it opens up the word and solves ur problem,
> but displays the URL.
> My problem can be solved if I am able in any way to read the file in a
> continuous stream format
> and in turn stream it to the clients browser then that should th trick, bcoz
> otherwise java tries to read the file according to its own interpretation
> which destroys the information
>
> TIA
> sanjay
>
--
Mark Wutka
Author of Special Edition Using Java Server Pages & Servlets (ISBN: 0789724413)
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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