码迷,mamicode.com
首页 > 移动开发 > 详细

Web app root system property already set to different value: 'webapp.root'

时间:2016-07-07 19:38:36      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:

java.lang.IllegalStateException: Web app root system property already set to different value: ‘webapp.root‘ = [....\tmp1\wtpwebapps\workreport\] instead of [.....\wtpwebapps\ApprovalFront\] 
- Choose unique values for the ‘webAppRootKey‘ context-param in your web.xml files! at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:150) at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:116) at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)

Tomcat发布多个项目时抛的webAppRootKey错误,  原因是部署在同一容器中的Web项目,定义了相同的webAppRootKey或者都没有定义

解决办法:需要为每个web都定义一个webAppRootKey

 <!--app1中的web.xml-->
<context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>app1.root</param-value>
</context-param>
 
<!--app2中的web.xml-->
<context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>app2.root</param-value>
</context-param>
 

 

Web app root system property already set to different value: 'webapp.root'

标签:

原文地址:http://www.cnblogs.com/liaojie970/p/5650947.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!