Although you will get the most fun and value from MoSKito if you fully integrate it in your (web)app at all layers, MoSKito also offers a kind of sniff-integration for waverers by leting you monitor existing servlets without code changes to your application. This HOWTO explains how.
First you will need to get MoSKito. Consult the How to get MoSKito manual if you have problems with that.
The MoSKito distribution contains a jar names moskito-tomcat.jar. Place this jar into your $CATALINA_HOME/server/lib directory.
Explanation: The moskito-tomcat.jar contains an alternative classloader provided by moskito. This classloader will only become active for specified contextes, so you will do no harm to your tomcat. See the javadoc or the source code for details.
Create (or modify) a context declaration for your webapp. The context declaration have to be named the same as the context you are accessing your webapp under. Usually it's the name of the webapp or the war file. The context declaration must contain following statement:
<Loader className="org.apache.catalina.loader.WebappLoader" delegate="false" reloadable="true" loaderClass="net.java.dev.moskito.tomcat.MoskitoWebappClassLoader" />Feel free to set reloadable and delegate attributes to whatever you feel like, the above example uses the default values.
Place the context declaration under $CATALINA_HOME/conf/Catalina/localhost/contextpath.xml. For example the contextdeclaration for moskitodemo webapp is named moskitodemo.xml and accessible here.
Put the both libs moskito-core.jar and moskito-web.jar in your applications WEB-INF/lib folder or into $CATALINA_HOME/shared/lib folder.
Start tomcat. Basically you're done and your servlet's service method will be monitored now. However, you'll probably wish to actually see the stats. Follow the instructions in the how to embed moskito web-ui in your application manual to embed the web-ui into your application. Alternatively you can just enable default log4j logger and watch the logfiles.