Changed to Java5 for-loop syntax.
Refactored servlet so that it no longer uses unreliable instance
variables.