First I select a link on a page that calls a servlet to create a new page of data, but before the new page appears, I select a different link to call another servlet to go to another page.
At this point the new servlet takes control of the browser connection and the previous servlet gets threaded off with the message "starting background thread". Now, the background thread keeps executing and ends up sitting around chewing up memory and cycles.
Is there a way to configure tomcat to kill the previous servlet rather than spinning off a new thread? Is there a way for the spun off thread to realize that it has been spun off and kill itself?
My environment is: jboss-3.0.4_tomcat-4.1.12 j2sdkee1.3.1 j2sdk1.4.1_01 jakarta-struts-1.1-b2