首先说加载顺序:context-param—>listener —> filter —> servlet
这四类加载顺序与配置顺序无关,对于每一类内部的加载顺序,与配置顺序有关;
listener 和 filter 在初始化的时候,都可能用到context-param里面的信息,所以先加载context-param;
listener 用于监听事件,如:容器的启动与销毁~~会话的建立、断开等。