Recently I started looking for a "Sinatra-clone", an ultralight web framework for Java. Something that allows you to define all of your URL-routing in one clean block of code, and maybe even write the implementations right there for simple cases. As opposed to Servlets... where you either use XML or else scatter annotations across the entire codebase, and need entirely separate Servlet classes for even the most simple route handlers.
Most of the options are either really excessive and/or counter to this approach (e.g. Spring, JEE), or else push you toward using Scala or Groovy rather than pure Java (e.g. Scalatra, Play, Ratpack). Spark and Vert.x are interesting, and I'm tinkering with both in my personal projects, but I'd like to see a bit more maturity and longevity before pushing them for production projects at my job.
Then it occurred to me that JAX-RS basically encompasses everything that I'm talking about. So far I've only used Jersey in the context of RESTful "services"... returning JSON to AJAX calls, or XML to other back-end systems. However, there's no reason why a JAX-RS method can't also return HTML (or whatever) to a browser, and replace the need for a full Servlet class. JAX-RS gives you access to session state if you want it, and tools such as filters/interceptors that you would need for non-trivial applications. If you add some kind of template library (e.g. Velocity, FreeMarker) then you pretty much have the gist of Sinatra in a widely-supported Java standard. JAX-RS 2.0 even gives you asynchronous HTTP (i.e. long-polling, server-side push) that seems easier than the Servlet 3.x version.
So I'm curious why at this point you might still want to use traditional Servlets at all? Obviously people have their subjective preferences... some people might simply prefer having a separate class for each route handler, or want the lowest learning curve possible when onboarding new developers, etc. However, OBJECTIVELY speaking, what functionality (if any) is offered by Servlet 3.x that is simply missing from JAX-RS (or might be more painful to use)? In choosing between traditional Servlets or JAX-RS for a web application, are there still use cases for which Servlets are unquestionably the more appropriate design choice?