同一个tomcat服务器里面部署两个JavaEE项目,都是用了log4j做日志。并且web.xml里面都监听了日志信息。
启动服务的时候报错。
于是在web.xml添加以下代码:
<display-name>myapp001</display-name>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>myapp001.root</param-value>
</context-param>
<display-name>myapp002</display-name>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>myapp002.root</param-value>
</context-param>
tomcat6中部署了两个web应用,都采用的是struts2+spring+hibernate框架,记录日志都用了log4j,结果webroot.app被重用了,启动tomcat时,出现错误,部分
错误信息如下:
严重: Exception sending context initialized event to listener instance of class
org.springframework.web.util.Log4jConfigListener
java.lang.IllegalStateException: Web app root system property already
set to different value: 'webapp.root' = [D:\Program Files\tomcat6
\webapps\abc\] instead of [D:\Program Files\tomcat6\webapps\abc\]
- Choose unique values for the 'webAppRootKey' context-param in your
web.xml files!
At the end there are three possible solutions for the initial problem:
(1) Provide any of your applications with a unique
'webAppRootKey'.
(2) Set the servlet context parameter
'log4jExposeWebAppRoot' to
'false'. This eliminates the use of log file
locations relative to
the web application's root directory but
still allows a log4j config
location outside the classpath.
(3) Remove
the 'Log4jConfigListener' from your application's web.xml.
分享到:
相关推荐
WebApp.cspro
基于easyUI为环境的前端简单环境搭建包(easyUI+jQuery+jsp)
用python搭建自己的一个小的服务器,并运行自己的web应用。
赠送jar包:jetty-webapp-9.3.19.v20170502.jar; 赠送原API文档:jetty-webapp-9.3.19.v20170502-javadoc.jar; 赠送源代码:jetty-webapp-9.3.19.v20170502-sources.jar; 赠送Maven依赖信息文件:jetty-webapp-...
Explained in detail qt how to build a web server
angular1.x 移动端开发webapp.zip
001_WebApp.pdf 章节概述 • 网站部署规划 部署网站 配置网站 监视网站 流量管理器 创建和配置网站 演示 1 :中国版 Windows Azure 创建新网站 使用 FTP 部署网站 使用 Web 部署来部署网站 演示 2 :...
现在很多企业都要做PDA开发,但又不想使用Android 开发,因为Android原生开发...在开发过程中,遇到了很多问题,为了帮助同病相怜的XX,将初始程序上传,希望对相关人员有所帮助。此程序主要实现了相机扫描,红外扫描。
基于vue.js 2.0的百度天气应用webapp,是学习vue不可多得的好资料,代码例子很好哦
基于Html5的webapp.pdf
springboot跨服务器文件上传,前端界面
从0到1实战移动WebApp.txt
skywalking 8.7 安装包,包括agent,skywalking-webapp.jar
Angular-generator-fountain-webapp.zip,Yeoman“Fountain”生成器启动未维护的webapp,Angularjs于2016年发布,是Angularjs的重写版。...angular的设计目的是全面解决开发人员的web应用程序工作流。
Webapp.ahk:“ AHK-Webkit” Webapp.ahk-使用AutoHotkey开发基于Web的应用程序的库
comet 很好的一个实例 var ajax = new Ajax.Request(WebApp._url_, ... setTimeout(WebApp.WebMain, 5000); }else { setTimeout(WebApp.WebMain, 10); } WebApp._noerror_ = false; }
Ajax-beat-webapp.zip,一个用于beat machine api的简单webapp。,ajax代表异步javascript和xml。它是多种web技术的集合,包括html、css、json、xml和javascript。它用于创建动态网页,其中网页的小部分在不重新加载...
webapp.zip