aspose file tools*
The moose likes Tomcat and the fly likes listing of jsp programs running in tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "listing of jsp programs running in tomcat" Watch "listing of jsp programs running in tomcat" New topic
Author

listing of jsp programs running in tomcat

Muthukumar Ramanujam
Greenhorn

Joined: Mar 09, 2012
Posts: 4
Hi,

Is there any way to list and then abort the jsp programs running in tomcat. This is required to identiy the programs which are running for longer duration and needs to be aborted instead of restarting the tomcat server.

Thanks

R Muthukumar
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
There is no such thing as a "JSP program" - what is it you want to terminate? Both servlets and JSPs should run for short periods of time; maybe you're asking about background tasks?
Muthukumar Ramanujam
Greenhorn

Joined: Mar 09, 2012
Posts: 4
Hi,

Thanks for the response, actually from jsp i am calling a java method which does some calculations and return the result to the jsp and displayed. Some times due a bug in the java code, the java program runs into a indefinite loop. I want to identify the prorams which is still running in the server.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Wouldn't it be easier to debug the code before you put it in a web app? Or to rewrite it so that it checks how long it runs, and then terminates whenever a certain fixed time has elapsed?
Muthukumar Ramanujam
Greenhorn

Joined: Mar 09, 2012
Posts: 4
Yes, you are right, the programs needs to be tested thoroughly, but some time it happens we end up loading a programs with bugs and are identified later. So i wanted to know is there any way to indentify. I will try to incorporate your suggestion of checking the time and terminates it if it runs beyond certain duration.

Thanks
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 1043
    
  13

Try this app. You can see all the threads and sessions, and restart individual apps or servlets without restarting tomcat.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
Muthukumar Ramanujam
Greenhorn

Joined: Mar 09, 2012
Posts: 4
Thank you very much for giving the wonderful tool, this is what i was looking for.

Thanks once again.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: listing of jsp programs running in tomcat