A classe 'BuscaEmpresa' apresenta erra ao ser acessada no browser.
package web;
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="/busca")
public class BuscaEmpresa extends HttpServlet{
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
PrintWriter writer = resp.getWriter();
writer.println("<html><body>");
writer.println("<b>Busca:</b>");
writer.println("</body></html>");
}
}
Erro:
HTTP Status 404 - /gerenciador/busca
type Status report
message /gerenciador/busca description The requested resource is not available.
Apache Tomcat/8.0.12