@WebServlet handling difference between tomcat and jetty

Section 3.8.1 of Java Servlet Specification v3.1 says:

Classes annotated with @WebServlet class MUST extend the javax.servlet.http.HttpServlet class.

So @Webservlet annotated classes which only implements javax.servlet.Servlet should not be accessible.
But:

  • Tomcat also accepts such servlet classes.
  • Jetty follows spec strictly, it will emits warnings like “xxx is not assignable from javax.servlet.http.HttpServlet” and rejects such servlets.