修改 ../conf/server.xml
添加:
<Service name="test"> <Connector port="8081" /> <Engine name="Catalina.test" defaultHost="localhost.test"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> <Host name="localhost.test" appBase="webapp2"> </Host> </Engine> </Service>
注意修改:service name,
connect port,
engine name,
defaultHopst,
Host name,
appBase.
不能和前面的相同