If you have more than one tomcat port and need more than one web application instance, see.
| The Code is as follows: |
Copy code |
|
<? Xml version = '1. 0' encoding = 'utf-8'?>
<Server port = "8005" shutdown = "SHUTDOWN">
<Resource name = "UserDatabase" auth = "Container"
Type = "org. apache. catalina. UserDatabase"
Description = "User database that can be updated and saved"
Factory = "org. apache. catalina. users. MemoryUserDatabaseFactory"
Pathname = "conf/tomcat-users.xml"/>
</GlobalNamingResources>
<Service name = "Catalina">
<Connector port = "7777" protocol = "HTTP/1.1"
ConnectionTimeout = "20000"
RedirectPort = "8443" type = "regxph" text = "yourobjectname"/>
<Connector port = "8009" protocol = "AJP/1.3" redirectPort = "8443"/>
<Engine name = "Catalina" defaultHost = "localhost">
<Realm className = "org. apache. catalina. realm. UserDatabaseRealm"
ResourceName = "UserDatabase"/>
<Host name = "localhost" appBase = "webapps"
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
</Host>
</Engine>
</Service>
<Service name = "Catalina2">
<Connector port = "8002" protocol = "HTTP/1.1"
ConnectionTimeout = "20000"
RedirectPort = "8444" type = "regxph" text = "yourobjectname"/>
<Connector port = "8010" protocol = "AJP/1.3" redirectPort = "8444" URIEncoding = "UTF-8"/>
<Engine name = "Catalina2" defaultHost = "localhost">
<Realm className = "org. apache. catalina. realm. UserDatabaseRealm"
ResourceName = "UserDatabase"/>
<Host name = "localhost" appBase = "webapps"
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
<Context path = "" docBase = "system"/>
</Host>
</Engine>
</Service>
</Server> |
Copy a service again and change the name and port. The test is successful.
Also, the following numbers are required: <Context path = "" docBase = "system"/>
If path is left blank, you can directly enter the URL and port to enter the system reference.