同一个服务器下不能同时启动两个tomcat。因为tomcat下的端口冲突,需要修改server.xml下面3个端口:
1.<Server port="8055" shutdown="SHUTDOWN">
2.<Connector port="7001" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" urlEncoding="UTF-8" />
3.<Connector port="8099" protocol="AJP/1.3" redirectPort="8443" maxPostSize="0"/>
保证两个tomcat的这三个端口都不冲突就可以了。先记下,后面再分析不同端口的作用原理。
参考:
[url]http://www.blogjava.net/allen-zhe/archive/2007/01/15/93981.html[/url]
[url]http://blog.csdn.net/aesop_wubo/article/details/7617416[/url]
[b]------------------------------------------------------[/b]
同一个windows服务器下启动两个tomcat,tomcat窗口标题展示成不同名字以示区分:
:doStart
shift
if not "%OS%" == "Windows_NT" goto noTitle
set _EXECJAVA=start "[color=red]Tomcat[/color]" %_RUNJAVA%
goto gotTitle
或
:doStart
shift
if not "%OS%" == "Windows_NT" goto noTitle
if "%TITLE%" == "" set TITLE=[color=red]Tomcat[/color]
set _EXECJAVA=start "%TITLE%" %_RUNJAVA%
goto gotTitle
[b]
修改红色部分[/b]
1.<Server port="8055" shutdown="SHUTDOWN">
2.<Connector port="7001" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" urlEncoding="UTF-8" />
3.<Connector port="8099" protocol="AJP/1.3" redirectPort="8443" maxPostSize="0"/>
保证两个tomcat的这三个端口都不冲突就可以了。先记下,后面再分析不同端口的作用原理。
参考:
[url]http://www.blogjava.net/allen-zhe/archive/2007/01/15/93981.html[/url]
[url]http://blog.csdn.net/aesop_wubo/article/details/7617416[/url]
[b]------------------------------------------------------[/b]
同一个windows服务器下启动两个tomcat,tomcat窗口标题展示成不同名字以示区分:
:doStart
shift
if not "%OS%" == "Windows_NT" goto noTitle
set _EXECJAVA=start "[color=red]Tomcat[/color]" %_RUNJAVA%
goto gotTitle
或
:doStart
shift
if not "%OS%" == "Windows_NT" goto noTitle
if "%TITLE%" == "" set TITLE=[color=red]Tomcat[/color]
set _EXECJAVA=start "%TITLE%" %_RUNJAVA%
goto gotTitle
[b]
修改红色部分[/b]