I'm getting 500 error when trying to map the servlet, I do not know what can be, I think it's the servlet class that's wrong.
Servlet
publicclassaddContatoServlet3extendsHttpServlet{protectedvoiddoGet(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException{RequestDispatcherrd;rd=request.getRequestDispatcher("/WEB-INF/View/adiciona-contato.jsp");
System.out.println("testando POST");
try{
rd.forward(request, response);
}catch(Exception e) {
e.printStackTrace();
}
}
protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
System.out.println("TESTANDO GET");
}
}
XML Web
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<display-name>testeWeb</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>addContatoServlet3</servlet-name>
<servlet-class>src.controllers.addContatoServlet3</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>addContatoServlet3</servlet-name>
<url-pattern>/testando</url-pattern>
</servlet-mapping>
</web-app>
Edit:Eclipseincludeseverythinginmyservletmapping: