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.
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
