在web.xml中配置文件路径classpath
2016-11-25 13:44
525 查看
控制台报错:Invalid 'log4jConfigLocation' parameter: ServletContext resource
<context-param><param-name>log4jConfigLocation</param-name>
<param-value>classpath:config/log4j.properties</param-value>
</context-param> (
我之前写的是classpath*: ,把*号去掉,这个问题就没了
)
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
=>> 至于网上对于这个异常的处理,对我的程序没有效果,我的问题不是出现在流的冲突上
java.lang.IllegalStateException异常产生的原因及解决办法
由于getWriter方法与在jsp页面中使用流相关的getOutputStream方法冲突,所以会造成这种异常,解决办法是:只需要在jsp页面的最后加上两条语句:
out.clear();
out=pageContext.pushBody();
相关文章推荐
- 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- spring mvc 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- spring mvc 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- web.xml 配置中classpath: 与classpath*:的区别
- web.xml 配置中classpath: 与classpath*:的区别
- 在web.xml中配置spring配置文件的路径
- Spring ClassPathXmlApplicationContext和FileSystemXmlApplicationContext读取配置文件的方法
- 在web.xml文件里面是怎么配置class文件的?
- web.xml 配置中classpath: 与classpath*:的区别
- 【Spring学习笔记-2】Myeclipse下第一个Spring程序-通过ClassPathXmlApplicationContext加载配置文件
- web.xml 配置中classpath: 与classpath*:的区别
- web.xml 配置中classpath: 与classpath*:
- web.xml 配置中classpath: 与classpath*:的区别
- Spring和Struts2配置文件不在默认路径下的web.xml配置方法