0

我有 Ubuntu 机器,其中有 tomcat 服务器/var/lib/tomcat6,现在我的代码有一个不同的目录。

我做了 mvn tomcat6:run 但是每当我从浏览器说 localhost 时,它都会获取/var/lib目录的 url,尽管我的提示符正在运行 mvn。

我还使用 sudo service tomcat6 stop 停止了默认的 tomcat。

但现在我想从其他目录访问我的 mvn 的 tomcat,并且还希望选择保持/var/lib/tomcat6原样,无论我需要什么。

4

1 回答 1

0

If you have multiple instances of Tomcat on your server, you need to run them on different ports (or interfaces). I don't know thich Tomcat Maven plugin you are using, but it probably have a configuration option something like:

<configuration>
    <port>/* Set a different port here */</port>
</configuration>

You should then be able to run both Tomcat instances and access them through different ports.

于 2013-04-29T11:21:57.147 回答