zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    【microstation CE二次开发】不打开microstation,以COM方式启动Microstation
    【microstation CE二次开发】环境搭建
    Node安装与卸载命令汇总
    Maven进行clean时报错,解决方法
    Django 报ckeditor/skins/moono/skin.js 404
    Handler dispatch failed; nested exception is java.lang.AbstractMethodError: Method com/mchange/v2/c3p0/impl/NewProxyResultSet.isClosed()Z is abstract
    精准测试系列分享之一:JaCoCo 企业级应用的优缺点分析
    Java 中常见的细粒度锁实现
    JVM 的运行时数据区域分布
    Java 细粒度锁续篇
  • 原文地址:https://www.cnblogs.com/ruiati/p/6943909.html
Copyright © 2011-2022 走看看