Estou fazendo um projeto simples que é cadastrar aluno sexo etc e está dando os dois erros abaixo.
Alguém pode me ajudar?
No google não adianta procurar.
The project was not buit since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project.
The type java.lang.Object cannot be resolved. It is indirectly reference from required. class file
E Também dá o erro de Warning
Implementation of version 2.5 of project facet jst.web could not be found. Functionality will be limited
OS ERROS ESTÃO NESSA CLASSE:
package servlets;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import pojo.Aluno;
import pojo.Disciplina;
/**
* Servlet implementation class for Servlet: ServletAluno
*
*/
public class ServletAluno extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String nome = request.getParameter("Nome");
String sexo = request.getParameter("Sexo");
String naturalidade = request.getParameter("Naturalidade");
Float renda = Float.parseFloat(request.getParameter("Renda"));
String[] disciplinas = request.getParameterValues("Disciplina");
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
Calendar nasc = Calendar.getInstance();
try {
nasc.setTime(sdf.parse( request.getParameter("Nascimento")));
} catch (ParseException e) {
e.printStackTrace();
}
Aluno aluno = new Aluno();
aluno.setNome(nome);
aluno.setSexo(sexo);
aluno.setNaturalidade(naturalidade);
aluno.setRenda(renda);
List listDisciplinas = new ArrayList();
for(String disc: disciplinas){
Disciplina d = new Disciplina();
d.setNome(disc);
listDisciplinas.add(d);
}
aluno.setDisciplina(listDisciplinas);
System.out.println(aluno.getNome());
System.out.println(aluno.getSexo());
System.out.println(aluno.getNaturalidade());
System.out.println(aluno.getRenda());
System.out.print(aluno.getDisciplina());
}
}
Mas aparentemente parece que está tudo certo.