tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Isak Rickyanto" <is...@telkom.net>
Subject not suitable driver?
Date Fri, 22 Feb 2002 10:35:41 GMT
I have this problem and please help me...

I have installed mm.mysql driver ( jar file )
in :
C:\tomcat4\lib
c:\tomcat4\webapps\Root\WEB-INF\lib\
c:\jdk1.3.1\lib\jre\ext
c:\tomcat4\common\lib

I have run this code , previous I have succeded run this program, but now it
show error :

javax.servlet.ServletException: No suitable driver

The CODES :
<%@ page language="java" import="java.sql.*"  %>
<%
ResultSet myResultSet=null;

Class.forName("org.gjt.mm.mysql.Driver");
Connection
myConn=DriverManager.getConnection("jdbc:mysql:3306://localhost/bukujsp?user
=root&password=ganteng");

Statement stmt=myConn.createStatement();

String kueri="INSERT INTO buku(isbn,judul,pengarang,penerbit,tahunterbit)
VALUES('9792023526','Belajar Sendiri Pemrograman PHP', 'M.Farid Aziz', 'Elex
Media Komputindo', '2001')";

int isitabel=stmt.executeUpdate(kueri);
%>

<html>
<head>
<title>Membuat Tabel Buku dengan JSP</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%
if (isitabel==1){
out.println("<h2>Penambahan Data pada Tabel Berhasil</h2><br>");
out.println("Kueri yang dilakukan :"+kueri);
}
else
{
out.println("Penambahan Data Gagal");
}

stmt.close();
myConn.close();
%>

</body>
</html>




--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message