您的位置:首页 > 其它

在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();
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  classpath 报错
相关文章推荐