File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to detect the servlet is already died in the  Tomcat. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to detect the servlet is already died in the  Tomcat." Watch "How to detect the servlet is already died in the  Tomcat." New topic
Author

How to detect the servlet is already died in the Tomcat.

FeiWen Cheng
Greenhorn

Joined: Dec 20, 2004
Posts: 21
I develop a servlet frame work providing the business service. But I got a big problem. There is a bug in my servlet. When the servlet runs for a while, the servlet will crash irregular. The question is:

Quesiton 1:
Now on I get to know the servlet is died by the user's report. Is there any solution to now whether the servlet is work properly automatically?

Question 2:
The only solution I know right now to recovery the servelet is shut down the Tomcat and restart the Tomcat again. (Of course, I am debug my servlet right now! ) Is there any way to restart the servlet without restarting the Tomcat.

Thanks for any help.


SCJP(1.4),SCWCD(1.3,1.4),SCBCD,SCJD(1.4),SCJD,SCMAD(1.0)
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
1. I like to stick in a sort of "back-door" GET request that uses a password to show management type information - I have a local html file that sets up the GET so all I have to do is click on it, fill in the password, and make the request to see if the servlet is running. You could automate this.

2. The Java Management servlet gives you the control needed to stop and reload a web application - you have to set up an account and password to use it.
Bill
FeiWen Cheng
Greenhorn

Joined: Dec 20, 2004
Posts: 21
Thanks William. Would you mind telling more about Java Management servlet? Maybe you can give me a URL about Java management servlet.

Thanks a lot.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
If you installed Tomcat you already have all the documentation you need right there. Start your tomcat and browse to "/tomcat-docs/manager-howto.html"
Bill
FeiWen Cheng
Greenhorn

Joined: Dec 20, 2004
Posts: 21
Thanks William. It's so helpful.
Thank you so much.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to detect the servlet is already died in the Tomcat.