当前位置: 代码迷 >> Web前端 >> Tomcat 配备多个端口
  详细解决方案

Tomcat 配备多个端口

热度:262   发布时间:2012-09-09 09:27:54.0
Tomcat 配置多个端口

1.打开conf/server.xml,添加代码:

<Service name="webapps1">
 <Connector port="8989" />
 <Engine name="Catalina.webapps1" defaultHost="localhost.webapps1">
   <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" />
   <Host name="localhost.webapps1" appBase="webapps1">
    <Context path="" reloadable="true" docBase="test" debug="0" />
    <Context path="/test" reloadable="true" docBase="test" debug="0" />
   </Host>
 </Engine>
</Service>

 其中test是项目名称;

 自己可以配置8989端口。

2.在tomcat下新建webapps1文件夹

  相关解决方案