Introduction
Earlier, Java Servlets were configured using the web.xml deployment descriptor.
While powerful, web.xml often became large, complex, and hard to maintain.
To simplify servlet configuration, Servlet Annotations were introduced—especially the @WebServlet annotation.
This lesson explains:
What servlet annotations are
What @WebServlet does
How to use it step by step
Why it is preferred in modern Java web development
No prior knowledge of annotations is required.