tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucas Ludvig" <>
Subject Re: A threading question!
Date Wed, 05 Jul 2000 16:35:29 GMT
When I say "simple threaded program" I mean that I am constructing a 
separate thread (not created by the servlet engine) to do some stuff, 
because I do need instance variables in my program.  I have solved my 
problem... the servlet would create the thread (the thread being responsible 
for output to the browser) and then the servlet would be done and the 
response would be committed before the thread finished outputting to the the 
browser.  Telling the servlet to wait for the thread to be done using a 
join() statement allows the thread to output to the browser.
Thanks for your help.


>From: William Brogden <>
>Subject: Re: A threading question!
>Date: Wed, 05 Jul 2000 10:47:54 -0500
>Lucas Ludvig wrote:
> >
> > Hello People,
> >
> > Can Tomcat handle threads that send output to two separate
> > HttpServletResponse objects "simultaneously"?  Currently my simple 
> > program locks up and no output appears in the browser.  Any input
> > appreciated greatly.
> >
>Certainly, thats the whole idea. The servlet engine activates a
>Thread for each HTTP request so as long as your servlet does not use
>instance variables there should be no interference. When you say "my
>simple threaded program" do you mean that you are starting another
>Simple servlets typically use the Thread provided by the servlet
>WBB -  Chief Scientist, LANWrights, Inc.
>Java Programmer Certification information and mock exam
>To unsubscribe, email:
>For additional commmands, email:

Get Your Private, Free E-mail from MSN Hotmail at

View raw message