This code works fine, except when it's finished executing, Tomcat's localhost.log contains multiple (10x-20x) copies of the line "Success" from line 23. The code is pretty much linear and line 23 is the only place anywhere where "Success" is printed, so I don't understand why the line is executed more than once, let alone dozens of times. Preceeding each "Success" line in the log is Feb 28, 2011 1:06:17 PM org.apache.catalina.core.StandardWrapperValve invoke (the timestamp is the same in each copy). The getID() method has been omitted from the code below. It just does a SQL query, returns a string, and contains no System.out.println statements.
If a regular clown is funny, then a larger clown would be funnier. Math. Verified by this tiny ad: