1 Tomcat deployment multiple Web apps can be set up with different encodings, ports, and Server.xml configured as follows:
<?xml version= ' 1.0 ' encoding= ' utf-8 '?>
<server port= "8014" shutdown= "Shutdown" >
<!--APR Library loader. Documentation At/docs/apr.html--
<listener classname= "Org.apache.catalina.core.AprLifecycleListener" sslengine= "on"/>
<!--Initialize Jasper prior to WebApps is loaded. Documentation At/docs/jasper-howto.html--
<listener classname= "Org.apache.catalina.core.JasperListener"/>
<!--Prevent memory leaks due to use of particular Java/javax apis-->
<listener classname= "Org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<listener classname= "Org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<listener classname= "Org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
<GlobalNamingResources>
<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= "9091" protocol= "http/1.1"
Connectiontimeout= "60000" maxthreads= "redirectport=" 8443 "uriencoding=" UTF-8 "/>"
<connector port= "18014" protocol= "ajp/1.3" redirectport= "8443"/>
<engine name= "Catalina" defaulthost= "localhost" >
<realm classname= "Org.apache.catalina.realm.LockOutRealm" >
<realm classname= "Org.apache.catalina.realm.UserDatabaseRealm"
Resourcename= "Userdatabase"/>
</Realm>
Unpackwars= "true" autodeploy= "true"
Xmlvalidation= "false" Xmlnamespaceaware= "false" >
<context path= "" docbase= "D:\cjktest\tomcat71\webapps\cgplatform" reloadable= "true"/>
</Host>
</Engine>
</Service>
<service name= "Catalina1" >
<connector port= "9092" protocol= "http/1.1"
Connectiontimeout= "60000" maxthreads= "redirectport=" 8443 "uriencoding=" UTF-8 "/>"
<connector port= "28014" protocol= "ajp/1.3" redirectport= "8443"/>
<engine name= "Catalina" defaulthost= "localhost" >
<realm classname= "Org.apache.catalina.realm.LockOutRealm" >
<realm classname= "Org.apache.catalina.realm.UserDatabaseRealm"
Resourcename= "Userdatabase"/>
</Realm>
Unpackwars= "true" autodeploy= "true"
Xmlvalidation= "false" Xmlnamespaceaware= "false" >
<context path= "" docbase= "D:\cjktest\tomcat71\webapps\cgcoms" reloadable= "true"/>
</Host>
<!--
Unpackwars= "true" autodeploy= "true" >
<context path= "" docbase= "/home/software/tomcat_cas/webapps/cgcas" reloadable= "true"/>
</Host>
-
</Engine>
</Service>
</Server>
TOMCAT7 deploying multiple Web apps with different encodings, ports