[spring] Tomcat 中WEB文件的初始化操作

来源:互联网 发布:淘宝最新规则大全 编辑:程序博客网 时间:2024/05/18 01:29
  1. 首先查找globalWebXml ,在路径下conf /web.xml。

  2. 接着找应用的配置文件 example/ WEB-INF/web.xml 。文件中的各个配置项会被解析成相应属性保存在 WwbXml对象中。

  3. 实际是将Servlet包装为Context 容器中的StandardWrapper

for (ServletDef servlet : servlet.values() ){    Wrapper wrapper = context.createWrapper();    String jspFile = servlet.getJspFile();    .............    if(servlet.getLoadOnStartup() != null ){        wrapper.setLoadOnStartup(servlet.getLoadOnStartup().intValue());    }    ..............}
0 0
原创粉丝点击