异常备忘:No WebApplicationContext found: no ContextLoaderListener registered
来源:互联网 发布:苹果电子书阅读软件 编辑:程序博客网 时间:2024/04/30 01:10
此问题产生的原因是因他的资源文件没加载进来所以找不到文件引起,于是我在web.xml中加入了如下语句:
<!-- Spring ApplicationContext配置文件的路径,可使用通配符,多个路径用,号分隔
此参数用于后面的Spring-Context loader -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring/*.xml</param-value>
</context-param>
此参数用于后面的Spring-Context loader -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring/*.xml</param-value>
</context-param>
但还是有异常,仔细看了看,才发现原来是他的配置文件不是放在WEB-INF下,而是放在src目录下,解决的方法可将其spring的配置文件applicationContext转移阵地,转到WEB-INF下,或在web.xml下加入如下语句:
<!-- Spring ApplicationContext配置文件的路径,可使用通配符,多个路径用,号分隔此参数用于后面的Spring-Context loader -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext.xml</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext.xml</param-value>
</context-param>
- 异常备忘:No WebApplicationContext found: no ContextLoaderListener registered
- No WebApplicationContext found: no ContextLoaderListener registered异常
- No WebApplicationContext found: no ContextLoaderListener registered?
- No WebApplicationContext found: no ContextLoaderListener registered?
- No WebApplicationContext found: no ContextLoaderListener registered?
- No WebApplicationContext found: no ContextLoaderListener registered
- No WebApplicationContext found: no ContextLoaderListener registered?
- No WebApplicationContext found: no ContextLoaderListener registered?
- No WebApplicationContext found: no ContextLoaderListener registered错误
- No WebApplicationContext found: no ContextLoaderListener registered的解决方法
- No WebApplicationContext found: no ContextLoaderListener registered的解决方法
- java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
- No WebApplicationContext found: no ContextLoaderListener registered的解决方法
- No WebApplicationContext found: no ContextLoaderListener registered 错误解决
- java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered
- No WebApplicationContext found: no ContextLoaderListener registered?报错解决
- Spring 过滤器DelegatingFilterProxy No WebApplicationContext found: no ContextLoaderListener registered?
- java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered
- Android 常用 mimeType 表
- 2012年1月5日星期四
- 牵一只蜗牛去散步
- CSS 快速学习建议
- linux 下输出tomcat控制台信息(类似startup.bat)
- 异常备忘:No WebApplicationContext found: no ContextLoaderListener registered
- 删除窗体边框
- JavaScript中Date.parse 函数用法
- 企业管理系统各主要模块简介
- [置顶]发现live555中一个小bug(2)
- 最简单的flex网络拓扑图开发(二)从xml生成topo图
- 添加datatable的行和列
- 第七章快速排序之“快速排序QUICKSORT”
- oracle去重复的列的sql row_number() over( partition by)