Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
2013-06-29 01:55
513 查看
文章来源地址:http://www.blogjava.net/wyzstar/archive/2010/02/25/264930.html
解决方法:
在web.xml中加入这些配置
<context-param>
<param-name>contextConfigLocation </param-name>
<param-value>/WEB-INF/classes/applicationContext.xml </param-value>
< /context-param>
问题主要由于加载spring的默认配置文件位置一般是在/WEB-INF/下找applicationContext.xml文件。而Myeclipse文件自动生成的applicationContext文件是放在/WEB-INF/classes/applicationContext.xml。所以在默认加载中是找不到applicationContext.xml文件的,必须加入上面配置。
解决方法:
在web.xml中加入这些配置
<context-param>
<param-name>contextConfigLocation </param-name>
<param-value>/WEB-INF/classes/applicationContext.xml </param-value>
< /context-param>
问题主要由于加载spring的默认配置文件位置一般是在/WEB-INF/下找applicationContext.xml文件。而Myeclipse文件自动生成的applicationContext文件是放在/WEB-INF/classes/applicationContext.xml。所以在默认加载中是找不到applicationContext.xml文件的,必须加入上面配置。
相关文章推荐
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- 【转】Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/classes/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- 【JAVA错误笔记】 - 【Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法】
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- 解决Maven项目启动Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决
- 【Spring整合Struts2】Could not open ServletContext resource [/WEB-INF/application.xml]错误解决
- Could not open ServletContext resource [/WEB-INF/spring-servlet.xml]解决方法
- dorado7 Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- 关于“Could not open ServletContext resource [/WEB-INF/applicationContext.xml]”解决方案
- 关于“Could not open ServletContext resource [/WEB-INF/applicationContext.xml]”解决方案
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]