I'm using Wildfly 10 and try to deploy my web app on it. The problem is that servlet isn't deployed if it is annotated with @WebServlet(name = "/testServlet")
annotation. Still it is deployed when I make servlet mapping in web.xml (I use JavaEE 7, so I want to map servlets with annotation).
My web.xml looks like
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>
, so I mentioned 3.1 webapp. I checked classes in my .war archieve and there exists servlet class.
Can you help me with the problem?