tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: Would like to monitor memory use offline
Date Sun, 03 Aug 2008 10:34:15 GMT
Richard S. Huntrods wrote:
> SO - my question - is there a relatively easy way to create something 
> (say a servlet) to watch the stack *just like I can do manually using 
> the manager application* but email me when the stack approaches the 
> memory limits?


Tomcat is open source so if you want to copy something Tomcat is doing all 
you need to do is look at the Tomcat source and copy it. Granted it can be 
a bit impenetrable in places but I don't think this is one of them.

1. You know from the manager page what URL you are interested in.
2. The web.xml for the manager app will tell you which servlet is serving 
that URL.
3. The Tomcat 6 source is in a single tree under so finding the 
class is easy.
4. A quick look at the doGet() method in that class points you towards 
5. And there you have your answer - a simple API call.

For the e-mail side, take a look at the JavaMail example in the JNDI docs.


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message