惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
Y
Y Combinator Blog
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
Martin Fowler
Martin Fowler
博客园_首页
大猫的无限游戏
大猫的无限游戏
美团技术团队
S
SegmentFault 最新的问题
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MyScale Blog
MyScale Blog
小众软件
小众软件
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
N
Netflix TechBlog - Medium
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
博客园 - 【当耐特】
J
Java Code Geeks
F
Fortinet All Blogs
宝玉的分享
宝玉的分享
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美

博客园 - Squall

Spring2.5中基于注释的IoC struts2登录拦截器 Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AU hibernate.current_session_context_class 错误 - Squall - 博客园 Lucene中使用Paoding中文分词 ibatis VS hibernate 经典论述 超越传统软件开发技术 ASP 缩略图 (纠错版) persits.jpeg 破解版下载 Cant connect to SQL server with jtds 1.2.2 - Squall The hibernate core class ------ ExportToDB Struts+spring使用随机验证码 SSH 异常 解决 方案 总结 Struts-Logic 标签库 structs - 标签库(html) spring2.0 事务管理以及异常处理之体会 myeclipse tomcat 部署错误 ASP 通过正则提取信息内容种的图片 div+css 绝对定位和相对定位
Could not open ServletContext resource [/WEB-INF/applicat...
Squall · 2009-01-05 · via 博客园 - Squall

错误如下:

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from resource [/WEB-INF/applicationContext.xml] of ServletContext; nested exception is java.io.FileNotFoundException: Could not open resource [/WEB-INF/applicationContext.xml] of ServletContext
java.io.FileNotFoundException: Could not open resource [/WEB-INF/applicationContext.xml] of ServletContext

加载spring的配置文件时在默认位置/WEB-INF/下找不到applicationContext.xml文件,看了下,myeclipse自动生成的applicationContext.xml放在/WEB-INF/classes下,难怪找不到,终于发现问题了,下面在web.xml中做如下配置即可解决:

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/classes/applicationContext.xml</param-value>  
</context-param>