在有些應用中,有時需要在一臺機器上啟動兩個或多個Tomcat,如Tomcat+Eclipse+Geoserver應用中:
方法:
1、修改Server.xml
將所有涉及到端口的數字的首數字加1,具體情況可視需要而定,只要該端口沒有被占用即可。
如:
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="9009" protocol="AJP/1.3" redirectPort="9443"/>
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
2、修改Startup.bat
將 if not "%CATALINA_HOME%" == "" goto gotHome 語句注釋掉,
rem Guess CATALINA_HOME if not defined
set CURRENT_DIR=%cd%
rem if not "%CATALINA_HOME%" == "" goto gotHome
set CATALINA_HOME=%CURRENT_DIR%