项目报错:java web error:Choose unique values for the 'webAppRootKey' context-param in your web.xml files

来源:互联网 发布:pink原宿风拍照软件 编辑:程序博客网 时间:2024/06/07 05:09
当在Tomcat下部署多个项目并且都使用了Log4j。
如果没有定义webAppRootKey,会造成项目冲突,会报错Choose unique values for the 'webAppRootKey' context-param in your web.xml files
解决方法:在web.xml中log4jConfiguration的下面配置一下内容即可
 <context-param>
      <param-name>webAppRootKey</param-name>
      <param-value>webName.root</param-value>
</context-param>
这样的话当web Container启动时,把root的绝对路径写到系统变量里。




阅读全文
0 0
原创粉丝点击