tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Streaming to servlet under Tomcat/IIS
Date Wed, 29 Nov 2000 08:55:36 GMT

Anyone have a suggestion how I can stream data from a Socket in
an Applet to a Servlet running in Tomcat under IIS? The seemingly
obvious way would be something like:

// Client side:
Socket s = new Socket(host, port);
OutputStream os = s.getOutputStream();
DataOutputStream dos = new DataOutputStream(os);
dos.writeBytes("GET /proxy HTTP/1.0\r\n\r\n");

// Server side (inside doGet):
InputStream is = request.getInputStream();
byte[] buffer = new byte[8192];
  int count =;
  if(count == -1)
  // store buffer...

The doGet method in the servlet is in fact called, we know that.
However, no data is received through the input stream.
The code simply hangs on the read()-call. Any ideas?


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

View raw message