Once in every 30 seconds or so i need to check whether a servlet is running or not. I need to do this because the front end is showing old data in jsp. Sometimes the servlet will be running and it will be really slow. sometimes it wont' be running at all. so i need to know is there any proven method to check if a servlet is running or not.

1. If exists, in which log file can we find the status of servlets?

2. Is there any cmd / shell script which by executing will give the result whether the servlet is UP or not?

I'm using Oracle9ias server (build version 9.0.2). I wud also like to know how is it done for other servers (i.e. weblogic, tomcat, ... )