tomcat server.xml配置文件 解析
<Server port="8005" shutdown="SHUTDOWN"> ## 用来监听shutdown属性所对应的那个命令,实现关闭tomcat操作的TCP端口。
## 例如 在命令行键入:telnet ip port 后,然后键入大写的SHUTDOWN。然后回车,tomcat服务立即就会被关掉。
<!--APR library loader. Documentation at /docs/apr.html --> ## 好像是启动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" />
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources> ## 全局命名资源,来定义一些外部访问资源。启作用是为所有引擎应用程序所引用的外部资源的定义
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container" ##定义的一个名叫“UserDatabase”的认证资源,将conf/tomcat-users.xml加载至内存中,在需要认证的时候到内存中进行认证
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>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="CatalinaMedAdmin"> ##定义Service组件,同来关联Connector和Engine,一个Engine可以对应多个Connector,每个Service中只应一个Engine
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector
maxKeepAliveRequests="1" ## 一次连接可以进行的HTTP请求的最大请求次数。 1表示禁用,-1表示不限制个数,默认100个
redirectPort="8443" ##指定服务器正在处理http 请求时收到了一个SSL 传输请求后重定向的端口号
compressionMinSize="2048" ## 对小于该配置大小的文件不进行压缩(单位:B,也就是默认是2K)。注该属性自Tomcat7中有效
noCompressionUserAgents="gozilla, traviata" ## 指定不需要压缩的浏览器Agent,使用逗号间隔
compressableMimeType="text/text,text/html,text/xml,text/javascript,text/css,text/plain" ## 指定需要压缩的请求文档类型
/>
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8309" protocol="AJP/1.3" redirectPort="8443" /> ## Apache和Tomcat集成时使用
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="CatalinaMedAdmin" defaultHost="localhost"> ##指定缺省的主机名
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- The request dumper valve dumps useful debugging information about
the request and response data received and sent by Tomcat.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" ##指定主机名
unpackWARs="true" ##tomcat在webapps文件夹中发现war文件时,是否自动将其解压
xmlValidation="false" xmlNamespaceAware="false">
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" /> ##定义远程访问策略
-->
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" ##日志设置
prefix="localhost_access_log." ##指定log文件的前缀
-->
</Host>
</Engine>
</Service>
tomcat server.xml配置文件 解析的更多相关文章
- Tomcat server.xml配置文件
server.xml配置文件: <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to ...
- web服务器专题:tomcat(二)模块组件与server.xml 配置文件
web服务器专题:tomcat(二)模块组件与server.xml 配置文件 回顾: Web服务器专题:tomcat(一) 基础模块 一个Server.xml的实例 <?xml version= ...
- tomcat设置默认欢迎页、server.xml配置文件中的标签理解
一:要求:输入网址,不加文件名便可以访问默认页面 (1)项目中只有静态文件 方法:更改tomcat下的conf目录下的web.xml文件,如下图: <welcom-file-list>元素 ...
- tomcat server.xml docbase workdir
在tomcat安装好后,只要把你的web项目copy到%TOMCAT_HOME%webapp下面就可以是使用啦!!其实还有种方法就是设定虚拟目录,即把项目的目录映射到tomcat中.这样做即可以不用重 ...
- tomcat——Server.xml
本机tomcat位置:D:\tomcat7\apache-tomcat-7.0.61 server.xml 位置:D:\tomcat7\apache-tomcat-7.0.61\conf 注意:ser ...
- Tomcat server.xml UTF-8配置
Tomcat server.xml UTF-8配置 <Connector port="8080" maxThreads="150" minSpareThr ...
- tomcat 的 server.xml配置文件
tomcat的配置文件在其安装后生成的conf目录下,其中主配置文件便是conf下的server.xml文件. server.xml文件由server->service->engine-& ...
- Tomcat下的Server.xml配置文件详解
自15年毕业到现在已经入行两年多了,一直以来没有深入的了解过tomcat的详细配置,只懂修改一下端口号.在网上找了些相关资料来支撑这篇文章,深入了解server.xml文件各配置的作用 <?xm ...
- 原 tomcat的server.xml配置文件中三个端口的作用
以Tomcat7.0为例, 在安装目录下. conf/server.xml 中可以配置三个端口号, 如果使用多个tomcat 是需要配置这三个. 该Connector 用于监听请求. protocol ...
随机推荐
- JavaScript- The Good Parts CHAPTER 2
I know it well:I read it in the grammar long ago.—William Shakespeare, The Tragedy(悲剧:灾难:惨案) of Titu ...
- python 语句,条件,循环
#coding:utf-8__author__ = 'Administrator'#想要在同一行打印,print后面加','print 12,print 34'''从模块导入函数import some ...
- 如何用C#检查硬盘是否是固态硬盘SSD
博客搬到了fresky.github.io - Dawei XU,请各位看官挪步.最新的一篇是:如何用C#检查硬盘是否是固态硬盘SSD.
- 知道Form.Show()和Form.ShowDialog()的区别吗
博客搬到了fresky.github.io - Dawei XU,请各位看官挪步.最新的一篇是:知道Form.Show()和Form.ShowDialog()的区别吗.
- 递归小demo(1-100的和)
public class demo1 { public static void main(String[] args) { //初始值为100 int n = 100; //调用number方法,返回 ...
- BAPI
MM模块 1. BAPI_MATERIAL_SAVEDATA 创建物料主数据 注意参数EXTENSIONIN的使用,可以创建自定义字段 例如:WA_BAPI_TE_MARA-MATERIAL = IT ...
- PHP 函数:intval()
intval 变量转成整数类型. 语法: int intval(mixed var, int [base]); 返回值: 整数 函数种类: PHP 系统功能 内容说明:本函数可将变量转成整数类型. ...
- js 获取浏览器版本号
1.在web开发中,会常常让你推断当前使用的是那个浏览器及浏览器的那个版本号,依据浏览器版本号来调整CSS的样式, 使在web界面在各个浏览器展现达到最佳的效果,以下是获取当前浏览器的代码: getB ...
- insert into ... on duplicate key update 与 replace 区别
on duplicate key update:针对主健与唯一健,当插入值中的主健值与表中的主健值,若相同的主健值,就更新on duplicate key update 后面的指定的字段值,若没有相同 ...
- mongodb环境部署
mongodb 环境部署 1.环境说明 安装软件:mongodb-linux-x86_64-.tgz 软件安装位置:/usr/local/mongodb 数据存放位置:/var/mongodb/dat ...