tomcat6中部署了两个web应用,都采用的是SSH框架,记录日志都用了log4j,结果webroot.app被重用了,启动tomcat时,出现错误,部分错误信息如下:ERROR: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\esis\] instead of [D:\Program Files\tomcat6\webapps\esisOne\] - Choose
unique values for the 'webAppRootKey' context-param in your web.xml files!
解决办法: 两个web应用中定义了相同的webAppRootKey或者都没有定义,则现在就需要为每个web都定义一个webAppRootKey。
### app1:
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>app1.root</param-value>
</context-param>
### app2:
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>app2.root</param-value>
</context-param>
重新启用服务,然后进而测试!