I have a servlet that just outputs a message to the console. I run the application on Tomcat 9.0.80
@WebServlet("/")
public class HomeServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
System.out.println("Hello");
}
}
When I try to go to the address "/" in the browser, the message "Hello" is output to the console 2 times. What could be the problem?
I've tried doing this in different browsers. Only safari works fine. I tried reinstalling the system. It doesn't work!