if you are able to use JMX, then that is the way !, JMX is the integrated technology to Java standard edition that allows any application provide management and monitoring to its users , and of course Tomcat includes that.
you would do a query like
JMXQuery=Catalina:j2eeType=WebModule,*