Pluggability
When the original servlet API was released back in the late 1990s, writing servlets was the only way of writing server-side web applications in Java. Since then, several Jakarta EE and third-party frameworks have been built on top of the Servlet API. Examples of such frameworks include JSP and JSF, Apache Struts, Apache Wicket, Spring Web MVC, and several others.
Nowadays, very few (if any) Java web applications are built using the Servlet API directly. Instead, the vast majority of projects utilize one of the available Java web application frameworks. All of these frameworks use the servlet API “under the covers,” therefore setting up an application to use one of these frameworks has always involved making some configuration in the application’s web.xml
deployment descriptor. In some cases, some applications use more than one framework. This tends to make the web.xml
deployment descriptor fairly large and hard to maintain.
Servlet 3.0 introduced...