
This example exercises PokerHand.java via the PokerHandServlet, using Emma to report on the code-coverage. 

It assumes: 

Ant 1.6+  (see http://ant.apache.org )
Tomcat 5.0+ (see http://tomcat.apache.org/ )
and Java 1.5+ (see http://java.sun.com/j2se/1.5.0/ ) 

are installed on the machine. It also uses (provided):

Emma 2.0.5312 (see http://emma.sourceforge.net/)
JUnit 3.8.x (see http://www.junit.org)
Servlet API 2.3.x (see http://tomcat.apache.org/ )

It uses the Emma's "offline mode" to instrument the Java classes before building a war file.  After exercising the servlet, Emma is used to generate a report.

1. type: ant build

-- this will build ./dist/pokerhand.war

2. copy the war file to $TOMCAT_HOME/webapps

3. copy the ./lib/emma.jar file to $JAVA_HOME/jre/lib/ext  (so that Tomcat will pick up the jar)

4. start Tomcat and point browser to http://localhost:8080/pokerhand

5. select some card hands to exercise the servlet

6. copy coverage.ec from $TOMCAT_HOME/bin to this directory 

7. type: run.bat or run.sh as appropriate

8. point browser to ./coverage/index.html
