Tomcat Server.xml configuration file parsing

Source: Internet
Author: User

To split the service. I also split the other day. But the service did not come up so I would like to have any settings, so that the service in the host can only start one. Then I found another server and put the code in. The result seems to be what I expected to look like, the service started normally. So I think this can be formally split service. So I first stop the original service, and then put the relevant code in another file, and then restart the first service is normal, and then restart the follow-up back to the background is still unable to restart. So I was rolling back. The first split failed. I have opened the log to see that the port is occupied. I thought I was going to change the port from 18000 to 18140. Where does the 3086 port come from? So I see NETSTAT-LNTP | grep 3085. It was already used in the first service. The reason the service didn't get up is.     I've changed my two ports a little. I just want to know what other ports are doing in Tomcat in addition to the ports that we often access. What exactly are the Tomcat profiles related to those settings? I looked it up on the Internet, summed up the summary. (I hope you don't think I share the low) below is a toncat configuration <?xml version= ' 1.0 ' encoding= ' utf-8 '?>
<server port= "8005" shutdown= "Shutdown" > # # is used to listen for the shutdown property of the corresponding life TCP port to close the tomcat operation.
# # For example, at the command line type: Telnet IP port, and then type the uppercase shutdown. Then enter, and the Tomcat service will be turned off immediately.
<!--APR Library loader. Documentation At/docs/apr.html-# # # seems to be the start Apr mode is optimized for static resources (HTML, pictures, etc.).
<!--
<listener classname= "Org.apache.catalina.core.AprLifecycleListener" sslengine= "on"/>
-
<!--Initialize Jasper prior to WebApps is 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> # # Globally named resources, to define some external access resources. The definition of external resources referenced by all engine applications
<!--Editable User database that can also is used by
Userdatabaserealm to authenticate users
-
<resource name= "Userdatabase" auth= "Container" # #定义的一个名叫 "Userdatabase" Authentication resources, load Conf/tomcat-users.xml into memory, authenticate to memory when authentication is required
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" was not itself A "Container",
Define subcomponents such as "valves" at the This level.
Documentation at/docs/config/service.html
-
<service name= "Catalinamedadmin" > # #定义Service组件, come with me Associated connector and engine, an engine can correspond to multiple connector, each service should only be one engine

<!--the connectors can use a GKFX executor, you can define one or more named thread pools-->
<!--
<executor name= "Tomcatthreadpool" nameprefix= "catalina-exec-"
Maxthreads= "minsparethreads=" 4 "/>
-


<!--A "Connector" represents an endpoint by which requests is 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 port= "8080" protocol= "Org.apache.coyote.http11.Http11NioProtocol" # #Connector中的port创建服务器端的端口号, this port listens for client requests connectiontimeout= "20000" # #连接超时时间 (MS)
maxkeepaliverequests= "1" # # The maximum number of requests for HTTP requests that can be made in a single connection. 1 means disable, 1 means no limit, default 100
Redirectport= "8443" # #指定服务器正在处理 The port number that the HTTP request was redirected after it received an SSL transfer requestUriencoding= "Utf-8" # #tomcat容器的URL编码格式 maxhttpheadersize= "8192" Enablelookups= "false" # #如果为true, you can make a DNS query by calling Request.getremotehost () to get the actual hostname of the remote client, or false to not make the DNS query, but instead return its IP address Acceptcount= "#" # #指定当所有可以使用的处理请求的线程数都被使用时, the number of requests that can be placed in the processing queue, requests that exceed this number will not be processed disable Uploadtimeout= "true" # #上传时是否使用超时机制 compression= "on" # # Compression options
Compressionminsize= "2048" # # does not compress files smaller than this configuration size (in B, the default is 2K). Note that the attribute is valid from TOMCAT7
Nocompressionuseragents= "Gozilla, Traviata" # # Specifies a browser agent that does not need to be compressed, using a comma interval
Compressablemimetype= "Text/text,text/html,text/xml,text/javascript,text/css,text/plain" # # Specifies the requested document type that needs to be compressed
/>

<!--Define an AJP 1.3 Connector on port 8009-
<connector port= "8309" protocol= "ajp/1.3" redirectport= "8443"/> # # Apache and Tomcat are integrated using

<!--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-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 is performed against this userdatabase is 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 won't work with Xerces 2.2.
-
Unpackwars= "True" # #tomcat在webapps文件夹中发现war文件时, whether it is automatically decompressed autodeploy= "true "# # is set to True, and when Web. XML changes, Tomcat automatically redeploy the program. Implementing this feature requires that background processing be allowed
Xmlvalidation= "false" Xmlnamespaceaware= "false" >
<!--Singlesignon valve, share authentication between Web applications
Documentation at:/docs/config/valve.html--
<!--
<valve classname= "Org.apache.catalina.authenticator.SingleSignOn"/> # #定义远程访问策略
-
<!--Access log processes all example.
Documentation at:/docs/config/valve.html--
<!--
<valve classname= "Org.apache.catalina.valves.AccessLogValve" directory= "Logs" # #日志设置
               prefix= "Localhost_access_ Log. "                             # #指定log文件的前缀                suffix= ". txt"               &NBS P                          ,         &NB Sp      # #指定后缀                pattern= "common"       &NB Sp                          ,         &NB Sp   # #有两个值,The common method records the remote host name or IP address, the user name, the date, the first line of the requested string, theHTTP response code, and the number of bytes sent. combined more value than common mode (see http://goon.iteye.com/blog/1814609 for details) Resolvehosts= "false"/> # # If this value is true, Tomcat translates the server IP address through DNS to the hostname and, if false, directly Write Server IP Address
-

</Host>
</Engine>
</Service>

Tomcat Server.xml configuration file parsing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.