File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
FeiWen Cheng
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13049
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13049
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks William. It's so helpful.
Thank you so much.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic