Servlet basics March 17, 2023 by soundarya122 with no comment Servlet Servlet is created using these 3 methods: extends HttpServlet implement Servlet extends GenericServlet Container is available inside of the server.Container is the runtime environment of any component. Servlets run inside the Container. Servlet lifecycle methods init service destroy web.xml also called Deployment Descriptor Forward the response and request to other servlets RequestDispatcher rd = request.getRequestDispatcher("MyConfigDemo"); rd.forward(request, response); Home folder String dir = System.getProperty("user.dir"); System.out.println("Dir: "+ dir); //Dir: /home/soundarya Previous Post Docker Commands Next Post Invoke SQL script during servlet initialization