项目启动的时候报错:java.lang.IllegalStateException,需要配置webAppRootKey

来源:互联网 发布:php pdf完整版 编辑:程序博客网 时间:2024/04/30 19:30
在项目web.xml中,好多应用都未配置webAppRootKey,导致在项目启动的时候报如下错:

java.lang.IllegalStateException: Web app root system property already set to different value: 'webapp.root' = [C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrvSc\installedApps\RD-SERVER1Node01Cell\scetb2b.ear\scetb2bWeb.war] instead of [C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrvSc\installedApps\RD-SERVER1Node01Cell\ties.ear\ties-web.war] - Choose unique values for the 'webAppRootKey' context-param in your web.xml files!

解决方案:
web.xml文件中两个项目webAppRootKey冲突,导致项目无法启动。
在启动出现错误的工程web.xml增加如下语句便可
<context-param>
<param-name>webAppRootKey</param-name>
<param-value> app.root </param-value>
</context-param

参考网址:http://blog.csdn.net/downloadsunlight2009/article/details/7514634