I have several Servlet filters which need to execute in order - one after the other. I don't want to declare them in the web.xml file, nor do I want to use the @WebFilter annotation. Instead, I use the ServletContext.addFilter() method.
The question is: are the filters chained in the same order, as the order I have called the addFilter() method? Is this documented somewhere?
I saw this question and the answer: How to define servlet filter order of execution using annotations in WAR but it doesn't cover the programmatic case I have.