上周由于要布4个项目到一台设备上,我刚开始想着是放到webapps下 后来老大说不能用一个端口,我就想到了启动多个tomcat,我老大可以在一个tomcat中配置多个端口,但是由于时间紧急没时间搞一下(稳中求进)
总结一下就是多加一个service
<Service name="Catalina2">
<Connector port="8090" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"/>
<Engine name="Catalina2" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="mywebapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
</Engine>
</Service>
在service级