The new annotation introduced in Servlet API 3.0 are so useful for configuring servlets/filters implemented by yourself. But... is there any way to configure servlets/filter provided by dependencies?
For instance, using Resteasy (actually many frameworks) is quite common to require something like:
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
(...)
</web-app
Therefore you cannot make use of annotation there. Due some distribution issues, I'd like to be able to use an empty web.xml, so would be nice to find how programmatically declare such mappings.