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

复制代码
复制代码
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

转载: https://www.cnblogs.com/liaojie970/p/5650947.html

 

复制代码
复制代码
 <!--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>
 
复制代码
复制代码

 

posted @   沐春风-燕南飞  阅读(274)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
点击右上角即可分享
微信分享提示