At which point does the execution of the code start to deviate from what you expected to happen? What are the inputs you're using, and what the relevant intermediate values? What path does the execution follow through (not what you think it should take, but what it actually takes)? Seeing no debugging output being generated anywhere in the code, how have you tried to debug this issue? In short: TellTheDetails
(As an aside on code quality: a) the use of interpolated SQL instead of properly setting parameters makes using PreparedStatement pointless, b) using scriptlets (a.k.a. Java code in JSP) is an outdated technique to be avoided, and c) comments about obsolete browsers like "(IE4+, NS6+)" do not inspire confidence about the JavaScript part.
Come have lunch with me Arthur. Adventure will follow. This tiny ad: