我正在Eclipse Mars下为Tomcat 8开发 . 这是我在已发布的server.xml中的应用程序上下文:
<Context docBase="C:\automation\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\ROOT" path="" reloadable="false"/>
<Context docBase="AutomationWeb" path="/automation" reloadable="true" source="org.eclipse.jst.jee.server:AutomationWeb"/>
没有其他背景定义 . 但是当我打开tomcat管理器应用程序时,我看到了我的应用程序的2个上下文:
一个带有“/ AutomationWeb”路径,另一个带有“/ automation”路径
我的应用没有context.xml
我发现了什么:
-
他们从我的应用程序的web.xml共享显示名称
-
我的应用程序可以在两个路径上运行 .
-
具有/ AutomationWeb路径的那个实际上不可重新加载
-
如果我从Eclipse中的Tomcat服务器中删除我的应用程序(Web模块),则两个条目都将从tomcat管理器应用程序中消失 .
-
删除Eclipse中的服务器并删除\ workspace.metadata.plugins \ org.eclipse.wst.server.core \ tmp0 \的内容没有帮助 .
如何使用/ AutomationWeb路径删除不需要的应用程序上下文?我应该检查什么配置?
1 回答
通过将发布目录从webapps更改为webappsauto来解决此问题 . 由于这个声明,似乎问题出现在server.xml中: