Bom dia, espero que alguém possa me ajudar.
Tenho uma Classe chamada ContatoDAO no pacote br.com.caelum.jdbc.dao. Estou importando essa classo com a tag:<%@ page import="br.com.caelum.jdbc.dao.*" %>
public void exclui(Contato contato) throws SQLException {
PreparedStatement stmt = connection.prepareStatement("delete from contatos where nome=? and endereco=? and email=?");
stmt.setString(1, contato.getNome());
stmt.setString(2, contato.getEmail());
stmt.setString(3, contato.getEndereco());
stmt.execute();
stmt.close();
}
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 26 in the jsp file: /excluir.jsp
The method exclui(Contato) is undefined for the type ContatoDAO
23: // grave nessa conexão!!!
24: ContatoDAO dao = new ContatoDAO();
25: // método elegante
26: dao.exclui(contato);
27:
28: %>
29:
Contato excluído!
Espero que alguém possa me ajudar, pois o erro só ocorre neste método exclui(Contato contato).
Desde já agradeço.