Servlet is server side technology in java and it is class file which executes inside the JSP/Servlet container. Servlets are used to
write mainly business logic in web application. Servlet is placed inside the private scope of the web application so nobody can access it directly.
In order to expose the servlet, we have to map it inside the web.xml file using "servlet" mapping tag and some unique url-pattern is assigned.
Now servlet can be accessed outside the world using this unique "url-pattern".
All the java popular web application frameworks are based on Servlet. Like Spring, JSF , Struts etc.