tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jiang, Peiyun" <>
Subject tomcat not sending all output
Date Fri, 03 Dec 2004 14:28:51 GMT
I have a servlet that is doing a lot of work. After the work is done, I send
out information to say that the work is done. But somehow tomcat
disconnected and the browser is not getting the whole output. I logged the
whole process and it does run to end. If I reduce the amount of work done by
the middle process, everything is OK. I'm confuded and could not figure out
why. Please help.

(1) Who decide to disconnect? Tomcat or the browser? I guess when the
processing is going, the browser may treat the server as NOT RESPONDING. 
(2) How to keep the connection alive?



The simplified code is like this:

MyServlet {

 out = request.getWriter();

 out.println("something out");
 logger.debug("step 1: we got here");

 OtherClass.doOtherStuff();//this takes a few minutes (1-5 min)

 logger.debug("step 2: some other things")
 out.println("some other thing out");

class OtherClass {

  doOtherStuff() {
    logger.debug("1. got here");
       //do a lot
    logger.debug("2. got here");

log file output:
step 1: we got here
1. got here
2. got here
step 2: some other things
browser output:
something out
expected browser output:
something out
some other thing out

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message