Eu tive que fazer isso e encontrei a solução mais simples para ser isso .
Dê uma olhada e veja se é isso que você quer depois.
Running multiple tomcat by using a single catalina_base
and catalina_home
.
This will make it easy to manage server management
to use only one tomcat setup instance
Download tomcat-6+ and unpack it. Modify two configuration files under
conf
:
server.xml
replace ports & access log and cluster instance name with variables
like:
<Server port="${tomcat.server.port}1" shutdown="SHUTDOWN">...
<Connector port="${tomcat.server.port}2" protocol="HTTP/1.1"
connectionTimeout="20000" redirectPort="8443" />...
catalina.properties
change log file prefix like
1catalina.org.apache.juli.FileHandler.prefix = ${tomcat.server.port}.catalina
and before you run the command you should set 2 environment variables
for each instance like
set JAVA_OPTS=-Dtomcat.server.port=810
set CATALINA_TMPDIR=%cd%..work810
catalina run
set JAVA_OPTS=-Dtomcat.server.port=820
set CATALINA_TMPDIR=%cd%..work820
catalina run