tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jiang, Peiyun" <Peiyun.Ji...@nrc-cnrc.gc.ca>
Subject RE: tomcat not sending all output
Date Fri, 03 Dec 2004 14:45:28 GMT
No thread in other class. Usually I'll get result in about 1 minute and I do
want immediate output. But right now it takes 2-3 minutes and it is not
awfully long. I did not expect tomcat or the browser to drop connection. I
thought of doing what you suggested, but I'm confused and I want to find out
why.

Peiyun

-----Original Message-----
From: Ben Souther [mailto:bsouther@fwdco.com]
Sent: December 3, 2004 9:38 AM
To: Tomcat Users List
Subject: Re: tomcat not sending all output


On Fri, 2004-12-03 at 09:28, Jiang, Peiyun wrote:
> 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.
Are you doing things asynchronously in the other class (spawning a new
thread)?


It's generally considered bad form to try to keep a browser connection
open for 5 minutes.  

What I do in this type of situation is kick off the other process and
then immediately redirect the user to another page that refreshes
periodically, checking the status of the long running process.  


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

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


Mime
View raw message