| Author |
Connection Factory (Connection String)
|
André Asantos
Ranch Hand
Joined: Nov 23, 2009
Posts: 234
|
|
Hi guys,
please help me I have the following class
Vide:
package br.com.caelum.tarefas;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class ConnectionFactory {
public Connection getConnection() throws SQLException {
System.out.println("conectando...");
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) {
throw new SQLException(e);
}
return DriverManager.getConnection("jdbc:mysql://localhost/fj21",
"root", "root");
}
}
I would like to know if were the login entered wrong insted of the stack trace I wanna put a personalized page .jsp... How can I do it?
bye bye,
André AS
São Paulo - Brasil
|
André AS
|
 |
 |
|
|
subject: Connection Factory (Connection String)
|
|
|