Win a copy of Spring Boot in Practice this week in the Spring forum!

Sanjeev Das

Greenhorn
+ Follow
since Aug 25, 2011
Sanjeev likes ...
Netbeans IDE Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sanjeev Das

Any clues bout the issue... will b appreciated.
Hi,
thanks for the reply...appreciate that.
Oops, even by importing the mysql.jar into the WEB-INF/lib folder dsnt help...got the same exception.

10 years ago
JSP
Hi,
I am a newbie in using JSTL, so got stuck on a code where I need to retrieve the datas from a database without using any scripting code. I am using NetBEans IDE and mysql. I am using a user created database named as 'mydatabase' and a table named as 'events' which contains a column 'events' with lots of data in it.
So, the sql command Select events from mydatabase.events works fine.
A piece of my work goes below...is it made in an amaturish fashion?


Somehow, I keep receiving the exception message after the jsp page(sqlTest.jsp) is run.
The exception msg is:
javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/mydatabase"
and the root cause is:
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/mydatabase"

However, I have imported the jar file MySQL JDBC Driver from the IDE's library to my project. The jar does contain the package com.mysql.jdbc with the Driver.class file. I also have the JSTL 1.1 and the standard.jar in my project. So everything is in place and I really dont know whats going wrong. The funny part is, the code works properly with the Derby database and its driver. So whats wrong with mysql's Driver???