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\tomcat71\webapps\cgplatform" 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\tomcat71\webapps\cgcoms" 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>

tomcat7部署多个web应用不同编码,端口的更多相关文章

  1. 安装部署完office web apps 后,无法浏览Word

    安装部署完office web apps 后,在sharepoint 2010浏览器中浏览Word提示:“由于出现意外错误,Word Web App 无法打开此 文档 进行查看. 要查看此 文档,请在 ...

  2. 谈Web前端安全编码

    最近开发中涉及到有关输出正确的HTML标签这样的问题,正好对字符编码这块儿多看看,之前对这个方面认识的不深,思考的确实不够,如果下次再碰见类似的问题,若再次不少时间去调研的花,就得不偿失了. 就像正则 ...

  3. ASP.NET MVC3 系列教程 - 部署你的WEB应用到IIS 6.0

    I:ASP.NET MVC3 部署的前期工作 1.确认部署的服务器操作系统环境 首先我们确认服务器的操作系统版本 可以从系统命令行工具里输入: systeminfo 获取相关操作系统信息例如 然后再确 ...

  4. Eclipse部署多个Web项目内存溢出,java.lang.OutOfMemoryError: PermGen space

    Eclipse部署多个Web项目内存溢出,java.lang.OutOfMemoryError: PermGen space >>>>>>>>>& ...

  5. 利用eclipse新建的java web项目没有部署描述符web.xml文件怎么办?

    原文转自:http://blog.csdn.net/suyu_yuan/article/details/50947007 利用eclipse新建的Java Web项目没有部署描述符web.xml文件, ...

  6. Django部署到Apache Web Server

    Windows环境下,将Django部署到Apache Web Server 在Windows上部署Django(用mod_wsgi)会出现各种奇怪的问题,现简单记录下配置过程及遇到的错误及解决方法. ...

  7. JAVA WEB 中的编码分析

    JAVA WEB 中的编码分析 */--> pre.src {background-color: #292b2e; color: #b2b2b2;} pre.src {background-co ...

  8. office web apps 部署-搭建office web apps服务器

    二.搭建office web apps服务器 相关文件可以去焰尾迭分享的百度网盘下载,下载地址:http://pan.baidu.com/s/1o6tCo8y#path=%252Foffice%252 ...

  9. Java web中常见编码乱码问题(二)

    根据上篇记录Java web中常见编码乱码问题(一), 接着记录乱码案例: 案例分析:   2.输出流写入内容或者输入流读取内容时乱码(内容中有中文) 原因分析: a. 如果是按字节写入或读取时乱码, ...

随机推荐

  1. 源码编译Tkinter

    要让Python支持Tkinter, 需要首先安装tcl和tk两个软件包. 下载地址: http://www.tcl.tk/software/tcltk/download.html 或 tcl:htt ...

  2. Javascript中的依赖注入

    首先通过带参函数来定义一个Javascript函数,相当于C#中的一个类. var Person = function(firstname, lastname){ this.firstname = f ...

  3. WCF实现多个服务

    本篇体验使用WCF实现2个服务.一个使用HTTP通讯,一个使用TCP通讯. 大致思路是: → 创建WCF服务以及接口,写2个接口→ 实现2个接口→ 为WCF创建一个控制台项目的宿主,配置App.con ...

  4. Command /usr/sbin/chown failed with exit code 1?

    问题: 解答: 转自:http://stackoverflow.com/questions/7589771/command-usr-sbin-chown-failed-with-exit-code-1

  5. Mysql select语句设置默认值

    1.在没有设置默认值的情况下: SELECT userinfo.id, user_name, role, adm_regionid, region_name , create_time FROM us ...

  6. 使用 Crash 工具分析 Linux dump 文件

    转自:http://blog.csdn.net/commsea/article/details/11804897 简介: Linux 内核由于其复杂性,使得对内核出现的各种异常的追踪变得异常困难.本文 ...

  7. unity3d 5.6烘焙教程

    unity5.6是今年发布,作为5.x的最后一个版本,有很多烘焙优势,在此总结一些作为5.x系列完结的笔记这个版本在烘焙上的特点就是增加了渐进光照贴图(Progressive Lightmapper) ...

  8. 记一个js中的map数据结构

    <html><body> <script type="text/javascript">let arr =[{demo1:123,demo2:& ...

  9. Kubernetes中StatefulSet介绍

    StatefulSet 是Kubernetes1.9版本中稳定的特性,本文使用的环境为 Kubernetes 1.11.如何搭建环境可以参考kubeadm安装kubernetes V1.11.1 集群 ...

  10. SVG.js Mask覆盖和ClipPath裁剪

    一.SVG.Mask 覆盖物设置 1. var draw = SVG('svg1').size(300, 300); //SVG.Mask 覆盖物设置 var ellipse = draw.ellip ...