Suppose that you started the Web server, ran the following servlet twice by issuing an appropriate URL from the Web browser, and finally stopped Tomcat. What was displayed on the console when the servlet was first invoked? What was displayed on the console when the servlet was invoked for the second time? What was displayed on the console when Tomcat was shut down?
import javax.servlet.*;import javax.servlet.http.*;import java.io.*;publicclass Testextends HttpServlet {public Test() { System.out.println("Constructor called"); }publicvoid init()throws ServletException { System.out.println("init called"); }publicvoid doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { System.out.println("doGet called"); }publicvoid destroy() { System.out.println("destroy called"); }}