java.lang.IllegalStateException: Web app root system property already set to different value

同一个tomcat下面部署多个项目时,可能会报这个错误:


java.lang.IllegalStateException: Web app root system property already set to different value: 'webapp.root' = [D:/tomcat-5.0.19/webapps/tzbms/] instead of [D:/tomcat-5.0.19/webapps/its/] - Choose unique values for the 'webAppRootKey' context-param in your web.xml files!


解决方案:

在启动出现错误的工程web.xml增加如下语句便可

<context-param>

<param-name>webAppRootKey</param-name>

<param-value> app.root </param-value>

</context-param>



参考:

文章1               文章2          3

你可能感兴趣的:(tomcat部署多个项目出错)