SimpleServlet Demo for Tomcat Integration

The purpose of this demo is to show that you can monitor any servlet with moskito in tomcat without actually changing the code. By clicking the test link the content of the iframe below is reloaded with the results from the servlet. If the request was ok you will see an output like "Servlet slept : XXX". The servlet emulates some processing by sleeping an amount of time, this way giving the monitoring engine something to measure. If you choose to force the servlet to throw an error or click the random request link you will see an exception in the lower frame: "java.lang.RuntimeException: Emulating exception in processing". This is not a real error. If you are about measuring errors and exceptions you have to provide some, so you can count them. That's why the demo servlet throws an exception in 10% of requests emulating some real errors this way.
    Make a request to the servlet
or Force servlet to throw an exception
or Make a random request which will throw an exception in 10% of cases.

To see the ServletStats goto moskito User Interface
or see the stats from this servlet only




View source
You will not find any Moskito-related code in it, and still it works - Learn how
Copyright © 2006-2012, Moskito Project Team. http://moskito.dev.java.net.
Moskito is open source, distributed under the MIT License.