Servlet.init() and Filter.init() call sequence
问题 In which order are Servlet.init() and Filter.init() methods called in java web application? Which one is called first? Are all Servlet.init() methods called before than any Filter.doFilter method? 回答1: The filters are always initialized during webapp's startup in the order as they are defined in the web.xml . The servlets are by default initialized during the first HTTP request on their url-pattern only. But you can configure them as well to initialize during webapp's startup using the <load