Before we go into this and I start getting a headache (I detest JSP but enjoy telling people that fact) have you tried setting up a system DSN and attempting a working connection ?
I only suggest this as a first stage step becasue by doing so it will verify that other aspects of a possible connection problem are not the cause and will help narrow the problem down for me. There are lots of things that could be going on and it would help to see the whole page code and not just a connection snippet, but the system DSN method will at least verify certain theings.
Try configuring a system DSN, the try to get a working connection going. Post with your results and we'll go from there.