• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks William. It's so helpful.
Thank you so much.
 
Wait for it ... wait .... wait .... NOW! Pafiffle! A perfect tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic