Explain the lifecycle of a Servlet?
Servlert’s life cycle is the entire process from its creation until its destruction. A Servlet follows this path:
- Initialized by calling init( ) method
- Calls service( ) method to process request
- Terminated by destroy( ) method
Finally, the servlet is nothing but the garbage that gets collected by JVM's garbage collector.
BY Best Interview Question ON 25 Apr 2020