tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Pfeifer <>
Subject FW: tomcat-user : tomcat 3.2 returning partial page
Date Mon, 02 Apr 2001 17:56:13 GMT

Hello -

We're currently having a problem w/Tomcat not returning the complete content
back to the client. The behavior we are seeing on a request is:

- client makes a request to servlet
- server processes request
- client receives approx the first 1/2 of the page as the response
- when you hit 'refresh' in the browser (IE or Netscape) you immediately
receive the second half of the previous response, along with the HTTP
headers and full content of the  second response rendered in the browser.

This behavior is repeatable with both IE and Netscape browsers. However, we
do not see this behavior when using Allaire's JRun 3.0 servlet engine.

More specifically, our situation is this :

- an HTTP request comes into our servlet
- this request is packaged up and passed via CORBA to our application server
- the server processes the request and returns a byte[] via CORBA
- we send the response back to the client in the servlet via the code:

    // responsePage is a CORBA container class for the application server's
    // set servlet's response headers:
    // the content length header is the same as the length of the byte array
    // iterate through the name value pairs and set them in the servlet
    NVPArrayToHeaders(responsePage.head.headers, res);

      // get servlet response's output stream & send server response byte
      ServletOutputStream sos = res.getOutputStream();
    catch (IOException e)

We have verified that the headers are correct and well formed(by dumping
them to the console), and that the entire response document is contained in
the byte array coming back from the CORBA method (by dumping it to a file).
Am I misusing the ServletOutputStream? Should I wrap the ServletOutpurStream
object with a BufferedOutputStream?

Any help/insights would be appreciated,

Craig Pfeifer

Craig Pfeifer
Software Engineer
Aether Systems, Software Products Division
703.847.3303 x2053 

View raw message