You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jason Zhu <Ja...@beaconit.com.au> on 2000/08/10 03:01:05 UTC

Input stream closed????

Hi, all:

We are doing a research project by using tomcat3.1 and servlet2.2 on
WindowsNT4.0.

The simplified outline of the task is: a client opens a Socket to the tomcat
web server at localhost and port 8080, for example.  After getting the
socket connection successfully, the client sends http1.1 request header
information to the server to invoke the servlet.  The client keeps reading
from its inputStream for the response header information until getting an
empty line.  Then client starts talking with the servlet like an echo server
scenario. the servlet and the client talk with each other by receiving and
sending text over the connection.

This whole thing is working just fine with tomcat3.1 beta version.  Both
from the client and the servlet's point of view, input and output stream are
kept open all the time.

But when we tried to move onto tomcat3.1 final version, we found that after
the client receives response header info successfully and starts to send out
other text (without exception on this), the servlet couldn't receive any
text from its input stream, but the servlet can send out text back to the
client and the client can receive the text.

How to detect whether the client's output stream is closed or dead, or
whether the servelt's input stream is closed or dead.  We know for sure in a
java HttpConnection situation, for the client once it opens the input
stream, the output stream is closed.

Any idea and suggestion on this matter is very, very much appreciated.

Thanks

Jason Zhu
Java Programmer
TimeFrame
Beacon IT Group
Phone: 0061-2-9413 3522
Email: jasonz@beaconit.com.au



This e-mail message is intended only for the addressee(s) and
contains information which may be confidential. Any view expressed
in this communication are those of the individual sender, except
where the sender is authorised to state them to be the views of
the Beacon Group. If you are not the intended recipient please 
do not read, save, forward, disclose, or copy the contents of this
e-mail.