Iai pessual,
Estou com bastante problemas...rsrsrs, seguinte:
Fiz uma busca por aki pelo site, encontrei alguns materias que me seriam uteis, fiz os testes aki no meu programa e nda de funcionar!!...então em ultima tentativa, venho aki pedir atenção de vcs!!!
estou estudando jsp, sou iniciante no assunto e estou tentando acessar um banco de dados mysql através de um projeto WEB, usando o eclipse. Sigo a apostila da Caelum mas não consigo resolver o problema.
Tenho o seguinte JSP (que achei em um tópico aki no GUJ):
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<%@ page import="java.sql.*"%>
<%
String host = "localhost";
String dbName = "db";
String user = "login";
String password = "password";
Class.forName("com.mysql.jdbc.Driver");
String dbUrl = "jdbc:mysql://" + host + "/" + dbName;
Connection c = DriverManager.getConnection(dbUrl, user, password);
Statement s = c.createStatement();
boolean sql = s.execute("create table teste" +
"(id int(5) primary key auto_increment" +
",username varchar(12)" +
",password varchar(12)" +
",email varchar(40)" +
", registDate date);");
out.println("Tabela criada");
%>
</BODY>
</HTML>
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Exception in JSP: /WebContent/conecta.jsp:12
linha 12, ou seja na conexão, ele ñ acha o driver.
Por favor, tentei ser bem detalhista no problema, se alguem ai puder me dar uma ajuda, ficarei extremamente grato!!
Valeu!!!