之前写了一个项目customer,因为一些原因就复制了一个customer2,结果customer2 运行的时候发现报了404的错误,想要把customer添加到Tomcat下的时候,提示我
Could not publish server configuration for Tomcat v8.0 Server at localhost. Multiple Contexts have a path of "/customer".
经大神指点之后,改好了,记录如下:
x
修改servers下的server.ml文件,在<context>中把path=“/customer"改成了"/customer2",然后就好了
注:网上有说直接在workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\更改server.xml的,但是我改了之后问题仍然存在,因为一旦在Eclipse重启Tomcat之后,这里的server.xml会被 \workspace\Servers\Tomcat v8.0 Server at localhost-config\里的server.xml覆盖。