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 ...
随机推荐
- poj1149--PIGS(最大流)
题意: 有m个猪圈 每个猪圈有不同数量的猪 [0, 1000]有n个顾客 每个顾客需要Bi头猪 有Ai个钥匙 能打开Ai个不同的猪圈顾客按顺序来买猪 只能买他有钥匙的猪 买完之后 这几个猪圈的猪可以相 ...
- 8-14-Exercise(博弈:HDU 1846 & HDU 1527 )
B.HDU 1846 Brave Game 算是最简单的入门博弈题吧...... 呃......我用的......算是不是方法的方法吧——找规律~ 可以发现:X-M为奇数时,先手会输:而为偶数的 ...
- [Webpack 2] Expose modules to dependencies with Webpack
When you have a dependency that has dependencies on global variables (like jQuery or lodash) or assu ...
- 【Linq递归查找系列】
Linq递归查找: public IEnumerable<MenuInfo> GetTree(int id, IEnumerable<MenuInfo> lst) { var ...
- MySQL对于datetime 源码分析
http://tsecer.blog.163.com/blog/static/150181720160117355684/ 一.时间比较的语法分析 在mysql中,通常时间是一个必不可少的类型,而 ...
- vector中的resize与 reserve
void reserve (size_type n); reserver函数用来给vector预分配存储区大小,即capacity的值 ,但是没有给这段内存进行初始化.reserve 的参数n是推荐预 ...
- TCPDUMP Command Examples
tcpdump command is also called as packet analyzer. tcpdump command will work on most flavors of unix ...
- Eclipse的LogCat总是自动清空怎么办?
我们经常会遇到这样一种情况,由于Log太多,导致我们的LogCat总是被自动清空,该怎么办?错误信息看不到,How to do? 其实,我们通过adb shell来解决这个问题. 1.配置环境变量 环 ...
- Android开发之异步获取并下载网络资源-下载图片和下载文本内容
在android网络开发过程中,经常需要获取网络资源,比如下载图片,下载文本文件内容等,这个时候就需要http请求来获取相应的网络资源.首先看看实例效果图: 下载图片截图 ...
- IIS 返回 405 - 不允许用于访问此页的 HTTP 谓词。终极解决办法!!!!
首先这个问题在其他网站(CSDN,新浪博客等) 回答基本都是没有回答到"根本"上面来(而且总在纠结要不要勾选"全部谓词") 我是自己对比了本地IIS之后得出的结 ...