【问题标题】:FAIL -Getting error in tomcat7: War file "WhitePagesAddressLookup.war" cannot be uploaded if context is defined in server.xmlFAIL - 在 tomcat7 中出现错误:如果在 server.xml 中定义了上下文,则无法上传 War 文件“WhitePagesAddressLookup.war”
【发布时间】:2015-11-10 14:48:23
【问题描述】:

我试图摆脱 404 tomcat 错误。经过大量研究后,我意识到我的 tocat7 管理器没有部署我的 war 文件。我收到此错误:失败 - 如果在 server.xml 中定义了上下文,则无法上传战争文件“WhitePagesAddressLookup.war”谁能告诉我为什么会这样?我已将 .war 文件放在 eclipse 文件夹内和桌面外,但放置不会影响“失败”错误。

【问题讨论】:

  • 你的war文件应该在tomcat的webapps目录下

标签: java eclipse tomcat jakarta-ee war


【解决方案1】:

通过阅读你得到的错误,我猜这是因为上下文WhitePagesAddressLookup是在<TOMCAT_HOME>/conf/server.xml中定义的,它与动态部署不兼容。最好停止Tomcat,将server.xml对应的Context节点移除,重启Tomcat,然后尝试重新部署。

【讨论】:

  • 因为我部署了两次war文件,所以我收到了这个错误。感谢您的所有帮助!
猜你喜欢
  • 1970-01-01
  • 2011-02-05
  • 1970-01-01
  • 2012-06-23
  • 1970-01-01
  • 1970-01-01
  • 2012-08-17
  • 2016-09-01
  • 2011-07-13
相关资源
最近更新 更多