As per the
Servlet 3.1 specification, a class that is annotated with @WebListener must implement one of the Servlet interfaces:
http://docs.oracle.com/javaee/6/api/javax/servlet/annotation/WebListener.html
I have a Webapp that is built using the Play Framework. I want to now run this Webapp in a Servlet container. For this reason, I'm using the Play2-war-plugin.
https://github.com/dlecan/play2-war-plugin
When I tried to deploymy war file to Glassfish, I faced s strange error as mentioned below:
I later looked into the source code for the play2-war-plugin and the Play2Servlet has the @WebListener annotation and extends a GenericServlet abstract class and this abstract class implements the interfaces. My question now is since Play2Servlet extends the GenericServlet, Play2Servlet also implements the interfaces. So why do I get this error?
Is it that the actual class that has the @WebListener annotation should actually implement one of the interfaces from the Servlet api irrespective of class hierarchies?