- Describe Servlet interface and HttpServlet hierarchy
- Explain init, service, destroy lifecycle phases
- Apply lifecycle hooks safely
BMC201 - Web Technology
2026-02-24
Lecture 18
Servlet Interface & Life Cycle
Week 5 | Unit III: Web App Development (Servlets + JSP)
BMC201 - Web Technology
Mr. Prashant Kumar Nag, Assistant Professor
Learning Objectives
Prerequisites
Syllabus Mapping
Agenda
Introduction
Lifecycle understanding is key to resource-safe servlet development.
Think About It
What fails if heavy initialization runs per request?
Servlet Life Cycle
Load -> init() once -> service() many -> destroy() once
Code Walkthrough
Syllabus memory points for Servlet Interface & Life Cycle:
Live Demo
Live implementation for Servlet Interface & Life Cycle:
?? Open Demo: Lecture 18 - Servlet Interface & Life Cycle
Demo checklist: - implement the key flow for this lecture - verify expected output for one success case - trigger one failure case and explain the fix
Resources & References
Structured Debug Checklist
Exam Preparation Questions: Short
Exam Preparation Questions: Long
Practice Task
Checklist
Can you:
Next Lecture
Questions?
Next: Lecture 19