I would suggest you get started with
JDBC in a much simpler environment. Forget about
JSP and JNDI and
Java EE and all of that stuff, it just confuses the issue so you have no idea where to look for the problem. Just write a simple command-line application to help you get familiar with JDBC.