Tentando acessar o URL : http://localhost:8080/gerenciador/cadastro Recebo 404: Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Já reiniciei o tomcat, porém, sem sucesso.
Codigo:
package br.com.servlets;
import java.io.IOException; import java.io.PrintWriter;
import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = "/cadastro") public class cadastroEmpresa extends HttpServlet { private static final long serialVersionUID = 1L;
@Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("<html><body>Empresa cadastrada com sucesso</body></html>");
System.out.println("pasosu por aqui");
}
}