-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------
Craig -
Since my request is of type multipart/form-data, what you said
guarantees that the input stream hasn't been touched. So, I tried:
request.getInputStream().skip(request.getContentLength());
This does the job for me. Now I'm getting all the output to my
browser that I expected. Yay! Thanks everybody for your help.
(So, this does mean that the servlet cannot sent output to the
response before it's done reading the request, as someone suggested.)
I'm thinking I should use readLine() instead of skip(). The
ServletInputStream.skip() method is inherited from InputStream, whose
documentation says that skip() is inefficient and should be
overridden. ServletInputStream does not override skip(), but it does
provide readLine() which is said to be "efficient". Also, I presume
that the value returned by getContentLength may be inaccurate, since
it comes from the request headers rather than reflecting the actual
content. If I repeatedly call readLine() until it returns -1, I'm
guessing that'll be faster and more reliable, but I can't readily test
those guesses...
Solomon
--
Solomon <|> [EMAIL PROTECTED]
Douglas /|\ http://web.mit.edu/srcd/www/
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]