As of Servlet 3.0, we can now declare web filters by annotation (@WebFilter)or dynamically (via the ServletContext object).
I know that using the @WebFilter does not allow for specifying the filter order. Similarly I haven't found any way to specify the order when declaring it dynamically via the ServletContext.addFilter() method. I've looked at the FilterRegistration object, but there is nothing there either.
Does that mean that the only way to specify the order of a filter in the filter chain is via web.xml? Is there no other mechanism available? Is this not a significant oversight of Servlet 3.0+?
Where in the chain do filters declared via annotation or via the ServletContext object? At the end of those declared in web.xml? Undefined?