Alguém poderia me dar uma luz para resolver esse erro?
HTTP Status 500 -
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: 6 in the generated java file
Only a type can be imported. br.com.caelum.jdbc.dao.ContatoDAO resolves to a package
An error occurred at line: 7 in the generated java file
Only a type can be imported. br.com.caelum.jdbc.modelo.Contato resolves to a package
An error occurred at line: 6 in the jsp file: /lista-scriptlet.jsp
ContatoDAO cannot be resolved to a type
3: <%@page import="java.util.List"%>
4: <ul>
5: <%
6: ContatoDAO dao = new ContatoDAO();
7: List contatos = dao.getLista();
8: for( int i=0;i<contatos.size();i++ ){
9: Contato contato = (Contato) contatos.get(i);
Estou estudando a apostila da Caelum, segue o código:
<%@page import="br.com.caelum.jdbc.dao.ContatoDAO"%>
<%@page import="br.com.caelum.jdbc.modelo.Contato"%>
<%@page import="java.util.List"%>
<ul>
<%
ContatoDAO dao = new ContatoDAO();
List contatos = dao.getLista();
for( int i=0;i<contatos.size();i++ ){
Contato contato = (Contato) contatos.get(i);
%>
<li> <%= contato.getNome() %>, <%= contato.getEmail() %>, <%= contato.getEndereco() %> </li>
<%
}
%>
</ul>
</html>
