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 ...
随机推荐
- Java获取一个路径下指定后缀名的所有文件
方法一: http://blog.csdn.net/zjx102938/article/details/8114114 import java.io.File; import java.util.Ar ...
- JBPM学习(六):详解流程图
概念: 流程图的组成: a. 活动 Activity / 节点 Node b. 流转 Transition / 连线(单向箭头) c. 事件 1.流转(Transition) a) 一般情况一个活动中 ...
- MyEclipse x.x各版本终极优化配置指南
先说优化:随着myeclipse版本不断更新,其功能不断强大,更加智能及人性化,为开发人员提供了很多便利.提高了开发速度,但是也牺牲了性能,让很多机器配置稍差的开发人员头疼不已.其实我们平时常用的功能 ...
- JAVA中List转换String,String转换List,Map转换String,String转换Map之间的转换类
<pre name="code" class="java"></pre><pre name="code" cl ...
- SQL 获取 IDENTITY 三种方法 SCOPE_IDENTITY、IDENT_CURRENT 和 @@IDENTITY的区别
-------总结:用SCOPE_IDENTITY()函数靠谱 @@IDENTITY (Transact-SQL) 返回最后插入的标识值的系统函数. 备注 在一条 INSERT.SELECT INTO ...
- Could not find class '****', referenced from method #####
找不到类,多半也是和第三方的jar包有关. 将找不到的类.在下图中的地方勾选出来.假设jar太多.有的类有冲突的话,须要明白其先后顺序. 请外一篇和第三方jar有关的异常的文章. Conversion ...
- find_if函数与partition函数的转换
编写程序,求大于等于一个给定长度的单词有多少.我们还会修改输出,使程序只打印大于等于给定长度的单词. 使用find_if实现的代码如下: #include<algorithm> #incl ...
- Android开发之IPC进程间通信-AIDL介绍及实例解析
一.IPC进程间通信 IPC是进程间通信方法的统称,Linux IPC包括以下方法,Android的进程间通信主要采用是哪些方法呢? 1. 管道(Pipe)及有名管道(named pipe):管道可用 ...
- 当前位置: 银光首页 > WPF > WPF学习教程 > WPF: ShowDialog() 切换到其他应用窗口后,再切换回来无法让子窗口总在最上方
转自http://www.silverlightchina.net/html/study/WPF/2012/0723/17608.html
- Android_Broadcast
/** * Broadcast(广播):是一种广泛运用的在应用程序之间传输信息的机制 * * BroadcastReceiver(广播接收者) * 是对发送出来的广播进行过滤接收并响应的一类组件,它就 ...