4 Replies Latest reply on Apr 19, 2004 9:23 PM by zhang_g

    using jstl, mysql, get error

    zhang_g Newbie

      hi, all,

      i've an application works fine with MSAccess, now i want to switch it to MySql. got the error like in the topic. here below is the detail:

      <sql:setDataSource var="food"
      driver="com.mysql.jdbc.Driver"
      url="jdbc:mysql:foodcoop"
      user="myuser" password="mypass"
      />

      <sql:query var="valid" dataSource="${food}">
      select * from staff;
      </sql:query>

      error:
      javax.servlet.ServletException: Unable to get connection, DataSource invalid: "No suitable driver"
      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
      org.apache.jsp.test_jsp._jspService(test_jsp.java:78)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

      ************************************

      i checked the jar file, it is in the right place, %jboss_home%/server/default/lib/

      anyone can help? any comment will be appreciated.