• tomcat7部署多个web应用不同编码,端口


    1个tomcat部署多个web应用可以设置不同编码,端口,server.xml配置如下:

    <?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 are 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="450" 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>
            
         <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true"
                xmlValidation="false" xmlNamespaceAware="false">      
                <Context path="" docBase="D:cjktest omcat71webappscgplatform" reloadable="true" />
          </Host>
        </Engine>
      </Service>

      <Service name="Catalina1">

        <Connector port="9092" protocol="HTTP/1.1"
                   connectionTimeout="60000" maxThreads="450" 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>
            
          <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true"
                xmlValidation="false" xmlNamespaceAware="false">      
                <Context path="" docBase="D:cjktest omcat71webappscgcoms" reloadable="true" />
          </Host>

    <!--

          <Host name="passport.caibab.com"  appBase="/home/software/tomcat_cas"
                unpackWARs="true" autoDeploy="true">            
                <Context path="" docBase="/home/software/tomcat_cas/webapps/cgcas" reloadable="true" />
          </Host>

    -->
        </Engine>
      </Service>
      
    </Server>

  • 相关阅读:
    无界鼠标 Mouse Without Borders
    dockerfile编辑时常用的sed命令,用来修改配置文件。
    LD_LIBRARY_PATH无效
    spark安装
    hadoop:/bin/bash: /bin/java: No such file or directory
    spark实现wordcount
    var和val的区别
    rdd的元素打印
    spark报错:invalid token
    上交所跨市场ETF申购赎回实时回报
  • 原文地址:https://www.cnblogs.com/ruiati/p/6943909.html
Copyright © 2020-2023  润新知