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

一个Tomcat 部署两个项目出现Web app root system property already set to different value: ‘webapp.root’

这个错误原因很明了,是web.xml出现了问题。需要给web.xml添加<context-param>指向不同的地方就ok了,不然编译的时候会指向同一个,

<context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>news2.root</param-value>
  </context-param>

完美解决!

猜你喜欢

转载自blog.csdn.net/weixin_41558061/article/details/79564265