How Servlet 4.0 and 5.0 are even more convenient than the perfect 3.1
Useful, potentially useful, not useful and harmful features of the modern Servlet API.
Servlets — the foundation of Java web applications
Even if code of a typical web application does not contain many servlets, filters and listeners, all Java web applications are build on top of the Servlet API. In any Java web application HTTP requests are handled by servlets. More visible web technologies such as JAX-RS or Spring libraries MVC, Boot or Security are sometimes convenient but never indispensable addons to servlets. If you develop an application using Spring, it is smarter to stick to the oddities of the framework. But if you only have to customize an existing Spring application, it can be faster to do it with filters or listeners.
The recent servlet features are not equally useful
Servlet API is so perfect that it hardly changes over time. But there have been some important enhancements. The problem is that earlier overviews give misleading ratings of the latest, already 4 year-old, Servlet features — features that turned out to be harmful or practically useless were praised, whereas tiny but universally useful features were…