Erro ao acessar localhost:8080/SON-JSP/Hello | Fórum | School of Net

Deseja poder participar de nosso fórum e tirar todas as suas dúvidas?
Clique aqui e assine nosso plano de acesso ilimitado. Saiba mais.

por Zacarias

2 meses, 2 semanas atrás Zacarias

Erro ao acessar localhost:8080/SON-JSP/Hello

Ao acessar o localhost:8080/SON-JSP/Hello após startar o Server e criar o Servlet o seguinte erro aparece: Type Status Report Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Segue o código gerado automaticamente para a Servlet: ``` import jakarta.servlet.ServletException; import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; /** * Servlet implementation class Hello */ public class Hello extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public Hello() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub response.getWriter().append("Served at: ").append(request.getContextPath()); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); } } ```

1 Respostas