javax.servlet.ServletException: #{pessoa.inserir}: javax.el.MethodNotFoundException: Method not found: [email removido]()
root cause
javax.faces.FacesException: #{pessoa.inserir}: javax.el.MethodNotFoundException: Method not found: [email removido]()
root cause
javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException: Method not found: [email removido]()
root cause
javax.el.MethodNotFoundException: Method not found: [email removido]()
public class Pessoa {
private String nome = null;
private String endereco = null;
private String cidade = null;
private String telefone = null;
public String getCidade() {
return cidade;
}
public void setCidade(String cidade) {
this.cidade = cidade;
}
public String getEndereco() {
return endereco;
}
public void setEndereco(String endereco) {
this.endereco = endereco;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getTelefone() {
return telefone;
}
public void setTelefone(String telefone) {
this.telefone = telefone;
}
}
public class PessoaJdbc {
private Pessoa pessoa = new Pessoa();
private static PreparedStatement pstmt = null;
private String result_busca = null;
private String result_inserir = null;
public static final String BUSCA_INVALIDA = "failure";
public static final String BUSCA_VALIDA = "success";
public static final String SUCESSO_INSERCAO = "success";
public static final String FALHA_INSERCAO = "failure";
public String inserir() throws SQLException {
pstmt = Conexao.getConexao().prepareStatement(
"Insert into pessoa(nome, endereco, cidade, telefone) values(?,?,?,?)");
pstmt.setString(1, pessoa.getNome());
pstmt.setString(2, pessoa.getEndereco());
pstmt.setString(3, pessoa.getCidade());
pstmt.setString(4, pessoa.getTelefone());
pstmt.executeUpdate();
pstmt.close();
return null;
}
public Pessoa getPessoa() {
return pessoa;
}
public void setpessoa(Pessoa pessoa) {
this.pessoa = pessoa;
}
}
Já agradeço qualquer ajuda.
