springmvc报java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/xxxx.xml]
如报错信息为:java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/springmvcFileload-servlet.xml]
首先,springmvc工程的web.xml中如有:www.twitterchina.net
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
则springmvc会去找applicationContext.xml配置文件,除非你用servlet另行指定。
其次,web.xml文件工程的servlet名称如果和项目名不同,而且也未指定springmvc的配置文件,程序会根据servet名称在WEB-INF下寻找对应的xml配置文件;同时严格区分大小写。