Tomcat server. xml

Source: Internet
Author: User
Server. xml
1.
2. < Server Port = "8005" Shutdown = "Shutdown" >
3. <! -- Attribute description
4. Port: Specifies a port that listens to requests for disabling tomcat.
5. Shutdown: The command string sent to the above port to close the server
6. -->
7. < Listener Classname = "Org. Apache. Catalina. Core. aprlifecyclelistener"   />
8. < Listener Classname = "Org. Apache. Catalina. mbeans. serverlifecyclelistener"   />
9. < Listener Classname = "Org. Apache. Catalina. mbeans. globalresourceslifecyclelistener"   />
10. < Listener Classname = "Org. Apache. Catalina. storeconfig. storeconfiglifecyclelistener" />
11.
12. < Globalnamingresources >
13.
14. < Environment Name = "Simplevalue" Type = "Java. Lang. Integer" Value = "30" />
15.
16. < Resource Name = "Userdatabase" Auth = "Container"
17. Type = "Org. Apache. Catalina. userdatabase"
18. Description = "User database that can be updated and saved"
19. Factory = "Org. Apache. Catalina. Users. memoryuserdatabasefactory"
20. pathname = "CONF/tomcat-users.xml"   />
21.
22. </ Globalnamingresources >
23. <! --
24. Each Service Element can have only one engine element. The element processes customer requests received by all <connector> elements in the same <service>.
25. -->
26. < Service Name = "Catalina" >
27. <! -- Attribute description
28. Name: Service name
29. -->
30.
31.
32.
33. <! --
34. connector element: defined by the connector interface. The <connector> element represents the customerProgramActual interactive parts,
35. It is responsible for receiving customer requests and returning response results to the customer.
36. -->
37. < Connector Port = "80" Maxhttpheadersize = "8192"
38. maxthreads = "150" Minsparethreads = "25" Maxsparethreads = "75"
39. enablelookups = "False" Redirectport = "8443" Acceptcount = "100"
40. connectiontimeout = "20000" Disableuploadtimeout = "True"   />
41. <! -- Attribute description
42. Port: Port Number of the Server Connector, which listens to requests from the client on the specified port
43. enablelookups: if it is true, you can obtain the remote client by calling request. getremotehost () for DNS query.
44. The actual host name. If it is false, no DNS query is performed, but its IP address is returned.
45. redirectport: The redirection port number after the server receives an SSL transfer request while processing the HTTP request
46. acceptcount: the number of requests that can be placed in the processing queue when all the threads that can process requests are used up.
47. The request will not be processed, and the connection refused error will be returned.
48. connectiontimeout: the number of waiting times out (in milliseconds)
49. maxthreads: set the maximum number of threads on the listening port. This value also determines the maximum number of threads that the server can respond to customer requests at the same time. The default value is 200.
50. Protocol: the Protocol must be set to AJP/1.3.
51. Address: if the server has more than two IP addresses, you can set the IP address of the port listener. By default, the port listens to all IP addresses on the server.
52. minprocessors: Number of threads created at server startup to process requests. One thread is responsible for each request.
53. maxprocessors: Maximum number of threads that can be created to process requests
54. minsparethreads: Minimum backup thread
55. maxsparethreads: Maximum backup thread
56. Debug: Log Level
57. disableuploadtimeout
58. -->
59.
60.
61. < Connector Port = "8009"
62. enablelookups = "False" Redirectport = "8443" Protocol = "AJP/1.3"   />
63.
64.
65. < Engine Name = "Catalina" Defaulthost = "Localhost" >
66. <! -- Attribute description
67. Name: corresponds to Catalina in $ catalina_home/config/Catalina
68. defaulthost: corresponds to the name attribute in the host element, that is, the localhost attribute in $ catalina_home/config/Catalina/localhost
69. The default virtual host name that processes the request. It is at least the same as the name attribute value of one of the host elements.
70. Debug: Log Level
71. -->
72.
73. < Realm Classname = "Org. Apache. Catalina. realm. userdatabaserealm"
74. resourcename = "Userdatabase" />
75. <! --
76. defined by the host interface. An engine element can contain multiple 77. Each 78. -->
79. < Host Name = "Localhost" Appbase = "Webapps"
80. unpackwars = "True" Autodeploy = "True"
81. xmlvalidation = "False" Xmlnamespaceaware = "False" >
82. <! -- Attribute description
83. Name: In this example, it has been emphasized as localhost in $ catalina_home/config/Catalina/localhost.
84. Virtual Host Name
85. Debug: indicates the log debugging level.
86. appbase: the Default Application Path, that is, place the application in a directory and set autodeploy to true, automatically deploy the application. This path is relative to $ catalina_home/(Basic directory of Web applications)
87. unpackwars: Set to true. If the web application is *. War, decompress the war file.
88. If this parameter is set to true, Tomcat automatically decompress the war file. Otherwise, the war file runs the application directly.
89. autodeploy: The default value is true, indicating that if a new Web application is put into appbase and Tomcat is running, the application is automatically loaded.
90. -->
91.
92. < Context Path = "/Demm" Docbase = "E: \ projects \ demm \ webroot" Debug = "0" Reloadable = "True"   >
93. </ Context >
94. <! -- Attribute description
95. path: Access Uri, for example, http: // localhost/is the root directory of my application. to access this application, use http: // localhost/demm to perform operations, this element is required.
96. indicates the prefix of the URL of the Web application to match a context. The request URL is in the form of http: // localhost: 8080/path /*
97. docbase: directory of the Web application, which must mark the Java Web application specification.
98. Web application file storage path or war file storage path
99. Debug: Log Level
100. reloadable: whether to reload when the program is modified. Setting true will affect the performance, but the modified files can be automatically loaded.
101. If true, Tomcat will support hot deployment and will automatically detect the/WEB-INF/lib of the Web Application
102. And/WEB-INF/classes directory changes, automatic loading of New JSP and Servlet, we can
103. Change the web application in the case of Tomcat
104. -->
105. </ Host >
106.
107. </ Engine >
108.
109. </ Service >
110.
111. </ Server >

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.