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
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???