Web app root system property already set to different value 错误

来源:互联网 发布:单机斗牛牛无网络破解 编辑:程序博客网 时间:2024/06/03 04:03


使用c3p0时出现:

Web app root system property already set to different value

需要加上

<context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>web</param-value>
  </context-param>



从代码看出,该方法其实就是把该web application的根目录的绝对文件路径作为属性保存在 System的属性列表中。

该属性的名字,由web.xml文件中的名为"webAppRootKey"的参数值指出。

如果不在web.xml中定义 webAppRootKey参数,那么属性名就是缺省的"webapp.root".在我们的petclinic项目中已经定义了 webAppRootKey参数,其值为"petclinic.root",因此,属性的名字就是"petclinic.root".

最后将webAppRootKey项配置好,错误解决。
阅读全文
0 0
原创粉丝点击