You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by anto paul <an...@hotmail.com> on 2003/06/18 10:14:03 UTC
How to stop execution of infinite loop in Tomcat ?
Hi
Is there any way to stop the execution of a JSP page on a remote server
? Today by mistake I wrote code which print inside a while loop. By mistake
I increased the counter instead of decreasing it. How I can stop the
execution of the page. Tomcat is running in another machine which I have no
physical access.
Regards
Anto paul
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: How to stop execution of infinite loop in Tomcat ?
Posted by Tim Funk <fu...@joedog.org>.
AFAIK, no. If the JSP/servlet was writing to stream - the browser closing the
connection could trigger an IO eventually. Of you can "luck out" with a
recursive loop and end up with a stack overflow.
But if you are in a tight loop like this:
while(true) {
int foo=1;
}
Then you are out of most likely luck.
Killing threads in the JVM is "unsafe". See the java.lang.Thread for details why.
-Tim
anto paul wrote:
> Hi
> Is there any way to stop the execution of a JSP page on a remote server
> ? Today by mistake I wrote code which print inside a while loop. By mistake
> I increased the counter instead of decreasing it. How I can stop the
> execution of the page. Tomcat is running in another machine which I have no
> physical access.
> Regards
> Anto paul
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org