【JAVA错误笔记】 - 【Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法】
错误描述:
Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
原因分析:
问题主要由于加载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>classpath*:applicationContext*.xml</param-value>
</context-param>
皆可解决!
【JAVA错误笔记】 - 【Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法】的更多相关文章
- Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/config/spring/applicationContext.xml]
在搭建SpringMVC框架的时候遇到了这个问题 问题的原因: 就是没有找到applicatoincontext.xml这个文件, 因为idea自动生成的路径不正确 因此需要再web.xml里面, ( ...
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
抛错: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document ...
- 关于SpringMVC项目报错:java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/xxxx.xml]
关于SpringMVC项目报错:java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/xxxx ...
- 出错: IOException parsing XML document from ServletContext resource [/cn.mgy.conig]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/cn.mgy.conig]
错误的详细内容: 严重: StandardWrapper.Throwable org.springframework.beans.factory.BeanDefinitionStoreExceptio ...
- 错误/异常:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/beans_common.xml]...的解决方法
1.第一个这种类型的异常 1.1.异常信息:org.springframework.beans.factory.BeanCreationException: Error creating bean w ...
- IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/app
web.xml初始化spring容器出错 org.springframework.beans.factory.BeanDefinitionStoreException: IOException par ...
- Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/config/springdemo-config.xml]
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML doc ...
- IOException parsing XML document from class path resource [WebRoot/WEB-INF/applicationContext.xml];
parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io. ...
- 【转载】错误:ORA-28002: the password will expire within 7 days 解决方法
免责声明: 本文转自网络文章,转载此文章仅为个人收藏,分享知识,如有侵权,请联系博主进行删除. 原文作者:xwdreamer 原文地址: 错误:ORA-28002: the ...
随机推荐
- iOS开发学习记录【整理】
◆ 开发环境基于 MacBook / Mac OS 10.10 / Xcode 6.1 / iOS 8 1.关于@property 在 .h 里声明了@property之后,默认 .m 不需要写@sy ...
- Asm Shader Reference --- Shader Model 3.0 part
ps部分 概览 Instruction Set Name Description Instruction slots S ...
- Html笔记(四)图像
图像标签: <img> <img src="../dir/file" alt="说明文字" height width border/> ...
- SharePoint 命令使用集锦 (持续更新中...)
首先要定位到 cd "Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN" 下面 ...
- HW3.1
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- vmware虚拟机下ubuntu 13.04使用zeranoe脚本交叉编译ffmpeg
2013-07-01今天是建党节,习总书记指出,党的建设要以“照镜子.正衣冠.洗洗澡.治治病”为总要求.希望我们的党越来越纯洁,为人民谋福利.言归正传,每次项目中需要编译相应的ffmpeg,都很费时费 ...
- A Tour of Go If
The if statement looks as it does in C or Java, except that the ( ) are gone and the { } are require ...
- 联通超级战舰W910 Root 后不能 上网 解决方案
联通版的超级战舰w910root后不能上网,一下是root方法: 超级战舰W910 Root方法: 电脑上安装“刷机精灵”(http://www.shuame.com/ ),在手机“菜单”——“系统设 ...
- MSSQLSERVER数据库- 字符串分割函数返回类型表
遇到这样一个问题,存储在数据库的数据是一串字符串如:1,2,3,4,5,6.想把这串字符串进行转变成一个表格,如下: 1 2 3 4 5 6 就是这样一个问题,有人同事,写了一个这样的封装函数,这样就 ...
- URL与资源
资源推荐 1.HTTP权威指南. <HTTP权威指南>由古尔利所著,<HTTP权威指南>详细解释了HTTP协议,包括HTTP是如何工作的,如何用HTTP来开发基于Web的应用程 ...