可以采取多tomcat 的形式 将已有tomcat复制为 tomcat2
修改tomcat\conf\Catalina\localhost下的xml文件
将docBase 指向项目路径 path和docBase 同名
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/NXZNDATA" reloadable="false"
docBase="D:\NXZNDATA">
</Context>
修改server.xml的端口号,在tomcat\conf\路径下
保证和第一个tomcat 默认的8005不冲突,这里使用8006
<Server port="8005" shutdown="SHUTDOWN">
<Server port="8006" shutdown="SHUTDOWN">
<Connector port="6160" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<Connector port="6165" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
标签:xml,docBase,tomcat,部署,路径,程序,修改,conf
From: https://blog.51cto.com/u_10940271/6347335