tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Pettenski <jpett...@rochester.rr.com>
Subject TC 4.1.12. Response behavior issue compared to TC 4.0.6
Date Fri, 25 Oct 2002 20:38:23 GMT

I am experiencing a behavior difference between TC 4.0.6 and 4.1.12.

The code below processes a servlet response.  In TC4.0.6 the client does
get the response message at the flush().  The sleep does not effect the 
delivery.

In TC 4.1.12, the output does not get delivered until after the code 
gets back into the area around:

org.apache.coyote.tomcat4.CoyoteAdapter.service(org.apache.coyote.Request, 
org.apache.coyote.Response) line: 226

Bottom line is the flush() has no effect on getting the data out of the 
stream.

The client is java code, however, I have reproduced the problem using 
this code chunk using
either mozilla or IE6 in place of the clients.


         try {
             logger.debug( "Release requestor" );
             response.setContentType( "text/plain; charset=ISO-8859-1" );

             PrintWriter out = response.getWriter();
             out.println( "OK" );
             out.flush();
             out.close();   // client should get "OK" message at this time
             logger.debug( "Release requestor - done" );
             String   readQueue = request.getParameter( "readQueue" );
             logger.debug( "Sleeping" );
            Thread.sleep(6000);
            logger.debug( "awake" );

             // Pull off parms passed and exec ReadCntl
         } catch ( Exception e ) {
         	logger.error("Unexpected error", e);
         }


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message