Several comments, no specific order:
You should not have
Java code in
JSP pages; put that in backing beans or
servlets.
The JDBC/ODBC bridge driver you're using is not thread-safe; using it in web apps is bound to cause problems.
You should get in the habit of using a configurable logging system such as java.util.logging or log4j; System.out.println is OK for example code but not for production use.