第一步:Tomcat默认空间webapps,中已经存在一个项目了,此时要增加一个项目运行可以将原本webapps目录copa一份,
改名为webapp1(或者其他看实际情况),然后,将webapp1目录中原来的项目清除,加入你要部署的新项目
第二部:更改conf中的配置文件:server.xml
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
redirectPort="8443" />
pattern="%h %l %u %t "%r" %s %b" />
redirectPort="8443" />
pattern="%h %l %u %t "%r" %s %b" />
第三部:重启Tomcat即可完成
此时,
访问第一个项目的路径为:localhost:8087/testOne
访问第二个项目的路径为:localhost:8089/testTwo