blob: cc785aaf71433bd99b720e1b5121ddd190e5b7de [file] [log] [blame]
刘洪青6266f992017-05-15 21:21:03 +08001<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Catalina Functional Specifications (7.0.77) - Administrative Apps - Administered Objects</title><meta name="author" content="Craig McClanahan"><style type="text/css" media="print">
2 .noPrint {display: none;}
3 td#mainBody {width: 100%;}
4</style><style type="text/css">
5code {background-color:rgb(224,255,255);padding:0 0.1em;}
6code.attributeName, code.propertyName {background-color:transparent;}
7
8
9table {
10 border-collapse: collapse;
11 text-align: left;
12}
13table *:not(table) {
14 /* Prevent border-collapsing for table child elements like <div> */
15 border-collapse: separate;
16}
17
18th {
19 text-align: left;
20}
21
22
23div.codeBox pre code, code.attributeName, code.propertyName, code.noHighlight, .noHighlight code {
24 background-color: transparent;
25}
26div.codeBox {
27 overflow: auto;
28 margin: 1em 0;
29}
30div.codeBox pre {
31 margin: 0;
32 padding: 4px;
33 border: 1px solid #999;
34 border-radius: 5px;
35 background-color: #eff8ff;
36 display: table; /* To prevent <pre>s from taking the complete available width. */
37 /*
38 When it is officially supported, use the following CSS instead of display: table
39 to prevent big <pre>s from exceeding the browser window:
40 max-width: available;
41 width: min-content;
42 */
43}
44
45div.codeBox pre.wrap {
46 white-space: pre-wrap;
47}
48
49
50table.defaultTable tr, table.detail-table tr {
51 border: 1px solid #CCC;
52}
53
54table.defaultTable tr:nth-child(even), table.detail-table tr:nth-child(even) {
55 background-color: #FAFBFF;
56}
57
58table.defaultTable tr:nth-child(odd), table.detail-table tr:nth-child(odd) {
59 background-color: #EEEFFF;
60}
61
62table.defaultTable th, table.detail-table th {
63 background-color: #88b;
64 color: #fff;
65}
66
67table.defaultTable th, table.defaultTable td, table.detail-table th, table.detail-table td {
68 padding: 5px 8px;
69}
70
71
72p.notice {
73 border: 1px solid rgb(255, 0, 0);
74 background-color: rgb(238, 238, 238);
75 color: rgb(0, 51, 102);
76 padding: 0.5em;
77 margin: 1em 2em 1em 1em;
78}
79</style></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="../images/tomcat.gif" align="right" alt="
Hongqing Liufd5ee812014-05-10 16:32:51 +080080 Catalina Functional Specifications
刘洪青6266f992017-05-15 21:21:03 +080081 " border="0"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 7</font></h1><font face="arial,helvetica,sanserif">Version 7.0.77, Mar 28 2017</font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="../images/asf-logo.svg" align="right" alt="Apache Logo" border="0" style="width: 266px;height: 83px;"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap class="noPrint"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li><li><a href="index.html">Functional Specs</a></li><li><a href="http://wiki.apache.org/tomcat/FAQ">FAQ</a></li><li><a href="#comments_section">User Comments</a></li></ul><p><strong>Administrative Apps</strong></p><ul><li><a href="fs-admin-apps.html">Overall Requirements</a></li><li><a href="mbean-names.html">Tomcat MBean Names</a></li><li><a href="fs-admin-objects.html">Administered Objects</a></li><li><a href="fs-admin-opers.html">Supported Operations</a></li></ul><p><strong>Internal Servlets</strong></p><ul><li><a href="fs-default.html">Default Servlet</a></li></ul><p><strong>Realm Implementations</strong></p><ul><li><a href="fs-jdbc-realm.html">JDBC Realm</a></li><li><a href="fs-jndi-realm.html">JNDI Realm</a></li><li><a href="fs-memory-realm.html">Memory Realm</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left" id="mainBody"><h1>Administrative Apps - Administered Objects</h1><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote>
Hongqing Liufd5ee812014-05-10 16:32:51 +080082<ul><li><a href="#Administered_Objects_Overview">Administered Objects Overview</a></li><li><a href="#Access_Logger">Access Logger</a></li><li><a href="#Connector">Connector</a></li><li><a href="#Context">Context</a></li><li><a href="#Default_Context">Default Context</a></li><li><a href="#Default_Deployment_Descriptor">Default Deployment Descriptor</a></li><li><a href="#Engine">Engine</a></li><li><a href="#Environment_Entry">Environment Entry</a></li><li><a href="#Host">Host</a></li><li><a href="#JDBC_Resource">JDBC Resource</a></li><li><a href="#Loader">Loader</a></li><li><a href="#Manager">Manager</a></li><li><a href="#Realm">Realm</a></li><li><a href="#Request_Filter">Request Filter</a></li><li><a href="#Server">Server</a></li><li><a href="#Service">Service</a></li></ul>
83</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Administered Objects Overview"><!--()--></a><a name="Administered_Objects_Overview"><strong>Administered Objects Overview</strong></a></font></td></tr><tr><td><blockquote>
84
85<p>This document defines the <em>Administered Objects</em> that represent
86the internal architectural components of the Catalina servlet container.
87Associated with each is a set of <a href="fs-admin-opers.html">Supported
88Operations</a> that can be performed when the administrative application is
89"focused" on a particular configurable object.</p>
90
91<p>The following Administered Objects are defined:</p>
92<ul>
93<li><a href="#Access Logger">Access Logger</a></li>
94<li><a href="#Connector">Connector</a></li>
95<li><a href="#Context">Context</a></li>
96<li><a href="#Default Context">Default Context</a></li>
97<li><a href="#Default Deployment Descriptor">Default Deployment Descriptor</a></li>
98<li><a href="#Engine">Engine</a></li>
99<li><a href="#Environment Entry">Environment Entry</a></li>
100<li><a href="#Host">Host</a></li>
101<li><a href="#JDBC Resource">JDBC Resource</a></li>
102<li><a href="#Loader">Loader</a></li>
103<li><a href="#Manager">Manager</a></li>
104<li><a href="#Realm">Realm</a></li>
105<li><a href="#Request Filter">Request Filter</a></li>
106<li><a href="#Server">Server</a></li>
107<li><a href="#Service">Service</a></li>
108</ul>
109
110</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Access Logger"><!--()--></a><a name="Access_Logger"><strong>Access Logger</strong></a></font></td></tr><tr><td><blockquote>
111
112 <p>An <em>Access Logger</em> is an optional <code>Valve</code> that can
113 create request access logs in the same formats as those provided by
114 web servers. Such access logs are useful input to hit count and user
115 access tracking analysis programs. An Access Logger can be attached to
116 an <em>Engine</em>, a <em>Host</em>, a <em>Context</em>, or a <em>Default
117 Context</em>.</p>
118
119 <p>The standard component implementing an <em>Access Logger</em> is
120 <code>org.apache.catalina.valves.AccessLogValve</code>. It supports the
121 following configurable properties:</p>
122 <ul>
123 <li><code>debug</code> - Debugging detail level. [0]</li>
124 <li><code>directory</code> - Absolute or relative (to $CATALINA_BASE) path
125 of the directory into which access log files are created.
126 [logs].</li>
127 <li><code>pattern</code> - Pattern string defining the fields to be
128 included in the access log output, or "common" for the standard
129 access log pattern. See
130 <code>org.apache.catalina.valves.AccessLogValve</code> for more
131 information. [common]</li>
132 <li><code>prefix</code> - Prefix added to the beginning of each log file
133 name created by this access logger.</li>
134 <li><code>resolveHosts</code> - Should IP addresses be resolved to host
135 names in the log? [false]</li>
136 <li><code>suffix</code> - Suffix added to the end of each log file name
137 created by this access logger.</li>
138 </ul>
139
140</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Connector"><strong>Connector</strong></a></font></td></tr><tr><td><blockquote>
141
142 <p>A <em>Connector</em> is the representation of a communications endpoint
143 by which requests are received from (and responses returned to) a Tomcat
144 client. The administrative applications shall support those connectors
145 that are commonly utilized in Tomcat installations, as described in detail
146 below.</p>
147
148 <p>For standalone use, the standard connector supporting the HTTP/1.1
149 protocol is <code>org.apache.catalina.connectors.http.HttpConnector</code>.
150 It supports the following configurable properties:</p>
151 <ul>
152 <li><code>acceptCount</code> - The maximum queue length of incoming
153 connections that have not yet been accepted. [10]</li>
154 <li><code>address</code> - For servers with more than one IP address, the
155 address upon which this connector should listen. [All Addresses]</li>
156 <li><code>bufferSize</code> - Default input buffer size (in bytes) for
157 requests created by this Connector. [2048]</li>
158 <li><code>debug</code> - Debugging detail level. [0]</li>
159 <li><code>enableLookups</code> - Should we perform DNS lookups on remote
160 IP addresses when <code>request.getRemoteHost()</code> is called?
161 [false]</li>
162 <li><code>maxProcessors</code> - The maximum number of processor threads
163 supported by this connector. [20]</li>
164 <li><code>minProcessors</code> - The minimum number of processor threads
165 to be created at container startup. [5]</li>
166 <li><code>port</code> - TCP/IP port number on which this Connector should
167 listen for incoming requests. [8080]</li>
168 <li><code>proxyName</code> - Host name to be returned when an application
169 calls <code>request.getServerName()</code>. [Value of Host: header]</li>
170 <li><code>proxyPort</code> - Port number to be returned when an application
171 calls <code>request.getServerPort()</code>. [Same as <code>port</code>]
172 </li>
173 </ul>
174
175</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Context"><strong>Context</strong></a></font></td></tr><tr><td><blockquote>
176
177 <p>A <em>Context</em> is the representation of an individual web application,
178 which is associated with a corresponding <em>Host</em>. Note that the
179 administrable properties of a <em>Context</em> do <strong>not</strong>
180 include any settings from inside the web application deployment descriptor
181 for that application.</p>
182
183 <p>The standard component implementing a <em>Context</em> is
184 <code>org.apache.catalina.core.StandardContext</code>. It supports the
185 following configurable properties:</p>
186 <ul>
187 <li><code>cookies</code> - Should be use cookies for session identifier
188 communication? [true]</li>
189 <li><code>crossContext</code> - Should calls to
190 <code>ServletContext.getServletContext()</code> return the actual
191 context responsible for the specified path? [false]</li>
192 <li><code>debug</code> - Debugging detail level. [0]</li>
193 <li><code>docBase</code> - The absolute or relative (to the
194 <code>appBase</code> of our owning <em>Host</em>) pathname of a
195 directory containing an unpacked web application, or of a web
196 application archive (WAR) file.</li>
197 <li><code>override</code> - Should settings in this <em>Context</em>
198 override corresponding settings in the <em>Default Context</em>?
199 [false]</li>
200 <li><code>path</code> - Context path for this web application, or an empty
201 string for the root application of a <em>Host</em>. [Inferred from
202 directory or WAR file name]</li>
203 <li><code>reloadable</code> - Should Tomcat monitor classes in the
204 <code>/WEB-INF/classes</code> directory for changes, and reload the
205 application if they occur? [false]</li>
206 <li><code>useNaming</code> - Should Tomcat provide a JNDI naming context,
207 containing preconfigured entries and resources, corresponding to the
208 requirements of the Java2 Enterprise Edition specification? [true]</li>
209 <li><code>workDir</code> - Absolute pathname of a scratch directory that is
210 provided to this web application. [Automatically assigned relative to
211 $CATALINA_BASE/work]</li>
212 </ul>
213
214 <p>Each <em>Context</em> is owned by a parent <em>Host</em>, and is
215 associated with:</p>
216 <ul>
217 <li>An optional <em>Access Logger</em> that logs all requests processed
218 by this web application.</li>
219 <li>Zero or more <em>Environment Entries</em> representing environment
220 entries for the JNDI naming context associated with a web
221 application.</li>
222 <li>Zero or more <em>JDBC Resources</em> representing database connection
223 pools associated with a web application.</li>
224 <li>A <em>Loader</em> representing the web application class loader used
225 by this web application.</li>
226 <li>A <em>Manager</em> representing the session manager used by this
227 web application.</li>
228 <li>An optional <em>Realm</em> used to provide authentication and access
229 control information for this web application.</li>
230 <li>Zero or more <em>Request Filters</em> used to limit access to this
231 web application based on remote host name or IP address.</li>
232 </ul>
233
234</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Default Context"><!--()--></a><a name="Default_Context"><strong>Default Context</strong></a></font></td></tr><tr><td><blockquote>
235
236 <p>A <em>Default Context</em> represents a subset of the configurable
237 properties of a <em>Context</em>, and is used to set defaults for those
238 properties when web applications are automatically deployed. A <em>Default
239 Context</em> object can be associated with an <em>Engine</em> or a
240 <em>Host</em>. The following configurable properties are supported:</p>
241 <ul>
242 <li><code>cookies</code> - Should be use cookies for session identifier
243 communication? [true]</li>
244 <li><code>crossContext</code> - Should calls to
245 <code>ServletContext.getServletContext()</code> return the actual
246 context responsible for the specified path? [false]</li>
247 <li><code>reloadable</code> - Should Tomcat monitor classes in the
248 <code>/WEB-INF/classes</code> directory for changes, and reload the
249 application if they occur? [false]</li>
250 <li><code>useNaming</code> - Should Tomcat provide a JNDI naming context,
251 containing preconfigured entries and resources, corresponding to the
252 requirements of the Java2 Enterprise Edition specification? [true]</li>
253 </ul>
254
255 <p>Each <em>Default Context</em> is owned by a parent <em>Engine</em> or
256 <em>Host</em>, and is associated with:</p>
257 <ul>
258 <li>Zero or more <em>Environment Entries</em> representing environment
259 entries for the JNDI naming context associated with a web
260 application.</li>
261 <li>Zero or more <em>JDBC Resources</em> representing database connection
262 pools associated with a web application.</li>
263 <li>An optional <em>Loader</em> representing default configuration
264 properties for the Loader component of deployed web applications.</li>
265 <li>An optional <em>Manager</em> representing default configuration
266 properties for the Manager component of deployed web applications.</li>
267 </ul>
268
269</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Default Deployment Descriptor"><!--()--></a><a name="Default_Deployment_Descriptor"><strong>Default Deployment Descriptor</strong></a></font></td></tr><tr><td><blockquote>
270
271 <p>Default web application characteristics are configured in a special
272 deployment descriptor named <code>$CATALINA_BASE/conf/web.xml</code>. This
273 section describes the configurable components that may be stored there.</p>
274
275 <p><strong>FIXME</strong> - Complete the description of default servlets,
276 default mappings, default MIME types, and so on.</p>
277
278</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Engine"><strong>Engine</strong></a></font></td></tr><tr><td><blockquote>
279
280 <p>An <em>Engine</em> is the representation of the entire Catalina
281 servlet container, and processes all requests for all of the associated
282 virtual hosts and web applications.</p>
283
284 <p>The standard component implementing an <em>Engine</em> is
285 <code>org.apache.catalina.core.StandardEngine</code>. It supports the
286 following configurable properties:</p>
287 <ul>
288 <li><code>debug</code> - Debugging detail level. [0]</li>
289 <li><code>defaultHost</code> - Name of the <em>Host</em> to which requests
290 will be directed if the requested host is unknown. [localhost]</li>
291 <li><code>name</code> - Logical name of this engine. [Tomcat Stand-Alone]
292 </li>
293 </ul>
294
295 <p>Each <em>Engine</em> is owned by a parent <em>Service</em>, and is
296 associated with:</p>
297 <ul>
298 <li>An optional <em>Access Logger</em> that logs all requests processed
299 by the entire container.</li>
300 <li>A <em>Default Context</em>, representing default properties of a
301 <em>Context</em> for automatically deployed applications for all
302 associated <em>Hosts</em> (unless overridden by a subordinate
303 component).</li>
304 <li>One or more <em>Hosts</em> representing individual virtual hosts
305 supported by this container.</li>
306 <li>A <em>Realm</em> used to provide authentication and access control
307 information for all virtual hosts and web applications (unless
308 overridden by a subordinate component).</li>
309 <li>Zero or more <em>Request Filters</em> used to limit access to the
310 entire container based on remote host name or IP address.</li>
311 </ul>
312
313</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Environment Entry"><!--()--></a><a name="Environment_Entry"><strong>Environment Entry</strong></a></font></td></tr><tr><td><blockquote>
314
315 <p>An <em>Environment Entry</em> is the representation of a
316 <code>&lt;env-entry&gt;</code> element from a web application deployment
317 descriptor. It will cause the creation of a corresponding entry in the
318 JNDI naming context provided to the corresponding <em>Context</em>. The
319 following configurable properties are supported:</p>
320 <ul>
321 <li><code>description</code> - Description of this environment entry.</li>
322 <li><code>name</code> - Environment entry name (relative to the
323 <code>java:comp/env</code> context)</li>
324 <li><code>type</code> - Environment entry type (must be one of the fully
325 qualified Java classes listed in the servlet spec).</li>
326 <li><code>value</code> - Environment entry value (must be convertible from
327 String to the specified <code>type</code>.</li>
328 </ul>
329
330</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Host"><strong>Host</strong></a></font></td></tr><tr><td><blockquote>
331
332 <p>A <em>Host</em> is the representation of an individual virtual host,
333 which has a unique set of associated web applications.</p>
334
335 <p>The standard component implementing a <em>Host</em> is
336 <code>org.apache.catalina.core.StandardHost</code>. It supports the
337 following configurable properties:</p>
338 <ul>
339 <li><code>aliases</code> - Zero or more DNS names that are also associated
340 with this host (for example, a particular host might be named
341 <code>www.mycompany.com</code> with an alias <code>company.com</code>).
342 </li>
343 <li><code>appBase</code> - Absolute or relative (to $CATALINA_BASE) path
344 to a directory from which web applications will be automatically
345 deployed.</li>
346 <li><code>debug</code> - Debugging detail level. [0]</li>
347 <li><code>name</code> - DNS Name of the virtual host represented by this
348 object.</li>
349 <li><code>unpackWARs</code> - Should web application archive files
350 deployed by this virtual host be unpacked first? [true]</li>
351 </ul>
352
353 <p>Each <em>Host</em> is owned by a parent <em>Engine</em>, and is
354 associated with:</p>
355 <ul>
356 <li>An optional <em>Access Logger</em> that logs all requests processed
357 by this virtual host.</li>
358 <li>One or more <em>Contexts</em> representing the web applications
359 operating on this <em>Host</em>.</li>
360 <li>A <em>Default Context</em> representing default <em>Context</em>
361 properties for web applications that are automatically deployed
362 by this <em>Host</em>.</li>
363 <li>A optional <em>Realm</em> used to provide authentication and access
364 control information for all web applications associated with this
365 virtual host (unless overridden by a subordinate component).</li>
366 </ul>
367
368 <p><strong>FIXME</strong> - Should we support configuration of the
369 User Web Applications functionality?</p>
370
371</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="JDBC Resource"><!--()--></a><a name="JDBC_Resource"><strong>JDBC Resource</strong></a></font></td></tr><tr><td><blockquote>
372
373 <p>A <em>JDBC Resources</em> represents a database connection pool (i.e.
374 an implementation of <code>javax.sql.DataSource</code> that will be
375 configured and made available in the JNDI naming context associated with
376 a web application.</p>
377
378 <p><strong>FIXME</strong> - properties of this administered object</p>
379
380</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Loader"><strong>Loader</strong></a></font></td></tr><tr><td><blockquote>
381
382 <p>A <em>Loader</em> represents a web application class loader that will
383 be utilized to provide class loading services for a particular
384 <em>Context</em>.</p>
385
386 <p>The standard component implementing a <em>Loader</em> is
387 <code>org.apache.catalina.loader.StandardLoader</code>. It supports
388 the following configurable properties:</p>
389 <ul>
390 <li><code>checkInterval</code> - Number of seconds between checks for
391 modified classes, if automatic reloading is enabled. [15]</li>
392 <li><code>debug</code> - Debugging detail level. [0]</li>
393 <li><code>reloadable</code> - Should this class loader check for modified
394 classes and initiate automatic reloads? [Set automatically from the
395 <code>reloadable</code> property of the corresponding <em>Context</em>]
396 </li>
397 </ul>
398
399 <p>Each <em>Loader</em> is owned by a parent <em>Context</em>.</p>
400
401</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Manager"><strong>Manager</strong></a></font></td></tr><tr><td><blockquote>
402
403 <p>A <em>Manager</em> represents a session manager that will be associated
404 with a particular web application. <strong>FIXME</strong> - Add support
405 for advanced session managers and their associated Stores.</p>
406
407 <p>The standard component implementing a <em>Manager</em> is
408 <code>org.apache.catalina.session.StandardManager</code>. It supports
409 the following configurable properties:</p>
410 <ul>
411 <li><code>checkInterval</code> - Number of seconds between checks for
412 expired sessions. [60]</li>
413 <li><code>debug</code> - Debugging detail level. [0]</li>
Hongqing Liufd5ee812014-05-10 16:32:51 +0800414 <li><code>maxActiveSessions</code> - The maximum number of active sessions
415 that are allowed, or -1 for no limit. [-1]</li>
416 </ul>
417
418 <p>Each <em>Manager</em> is owned by a parent <em>Context</em>.</p>
419
420</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Realm"><strong>Realm</strong></a></font></td></tr><tr><td><blockquote>
421
422 <p>A <em>Realm</em> represents a "database" of information about authorized
423 users, their passwords, and the security roles assigned to them. This will
424 be used by the container in the implementation of container-managed security
425 in accordance with the Servlet Specification. Several alternative
426 implementations are supported.</p>
427
428 <p><code>org.apache.catalina.realm.MemoryRealm</code> initializes its user
429 information from a simple XML file at startup time. If changes are made
430 to the information in this file, the corresponding web applications using
431 it must be restarted for the changes to take effect. It supports the
432 following configurable properties:</p>
433 <ul>
434 <li><code>debug</code> - Debugging detail level. [0]</li>
435 <li><code>pathname</code> - Absolute or relative (to $CATALINA_BASE) path to
436 the XML file containing our user information. [conf/tomcat-users.xml]
437 </li>
438 </ul>
439
440 <p><code>org.apache.catalina.realm.JDBCRealm</code> uses a relational
441 database (accessed via JDBC APIs) to contain the user information. Changes
442 in the contents of this database take effect immediately; however, the roles
443 assigned to a particular user are calculated only when the user initially
444 logs on (and not per request). The following configurable properties
445 are supported:</p>
446 <ul>
447 <li><code>connectionName</code> - Database username to use when establishing
448 a JDBC connection.</li>
449 <li><code>connectionPassword</code> - Database password to use when
450 establishing a JDBC connection.</li>
451 <li><code>connectionURL</code> - Connection URL to use when establishing
452 a JDBC connection.</li>
453 <li><code>debug</code> - Debugging detail level. [0]</li>
454 <li><code>digest</code> - Name of the <code>MessageDigest</code> algorithm
455 used to encode passwords in the database, or a zero-length string for
456 no encoding. [Zero-length String]</li>
457 <li><code>driverName</code> - Fully qualified Java class name of the JDBC
458 driver to be utilized.</li>
459 <li><code>roleNameCol</code> - Name of the column, in the User Roles table,
460 which contains the role name.</li>
461 <li><code>userCredCol</code> - Name of the column, in the Users table,
462 which contains the password (encrypted or unencrypted).</li>
463 <li><code>userNameCol</code> - Name of the column, in both the Users and
464 User Roles tables, that contains the username.</li>
465 <li><code>userRoleTable</code> - Name of the User Roles table, which contains
466 one row per security role assigned to a particular user. This table must
467 contain the columns specified by the <code>userNameCol</code> and
468 <code>roleNameCol</code> properties.</li>
469 <li><code>userTable</code> - Name of the Users table, which contains one row
470 per authorized user. This table must contain the columns specified by
471 the <code>userNameCol</code> and <code>userCredCol</code> properties.
472 </li>
473 </ul>
474
475 <p><strong>FIXME</strong> - Should we provide mechanisms to edit the contents
476 of a "tomcat-users.xml" file through the admin applications?</p>
477
478 <p>Each <em>Realm</em> is owned by a parent <em>Engine</em>, <em>Host</em>,
479 or <em>Context</em>.</p>
480
481</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Request Filter"><!--()--></a><a name="Request_Filter"><strong>Request Filter</strong></a></font></td></tr><tr><td><blockquote>
482
483 <p><strong>FIXME</strong> - complete this entry</p>
484
485</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Server"><strong>Server</strong></a></font></td></tr><tr><td><blockquote>
486
487 <p><strong>FIXME</strong> - complete this entry</p>
488
489</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Service"><strong>Service</strong></a></font></td></tr><tr><td><blockquote>
490
491 <p><strong>FIXME</strong> - complete this entry</p>
492
刘洪青6266f992017-05-15 21:21:03 +0800493</blockquote></td></tr></table></td></tr><tr class="noPrint"><td width="20%" valign="top" nowrap class="noPrint"></td><td width="80%" valign="top" align="left"><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="comments_section" id="comments_section"><strong>Comments</strong></a></font></td></tr><tr><td><blockquote><p class="notice"><strong>Notice: </strong>This comments section collects your suggestions
494 on improving documentation for Apache Tomcat.<br><br>
495 If you have trouble and need help, read
496 <a href="http://tomcat.apache.org/findhelp.html">Find Help</a> page
497 and ask your question on the tomcat-users
498 <a href="http://tomcat.apache.org/lists.html">mailing list</a>.
499 Do not ask such questions here. This is not a Q&amp;A section.<br><br>
500 The Apache Comments System is explained <a href="../comments.html">here</a>.
501 Comments may be removed by our moderators if they are either
502 implemented or considered invalid/off-topic.</p><script type="text/javascript"><!--//--><![CDATA[//><!--
503 var comments_shortname = 'tomcat';
504 var comments_identifier = 'http://tomcat.apache.org/tomcat-7.0-doc/funcspecs/fs-admin-objects.html';
505 (function(w, d) {
506 if (w.location.hostname.toLowerCase() == "tomcat.apache.org") {
507 d.write('<div id="comments_thread"><\/div>');
508 var s = d.createElement('script');
509 s.type = 'text/javascript';
510 s.async = true;
511 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
512 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
513 }
514 else {
515 d.write('<div id="comments_thread"><strong>Comments are disabled for this page at the moment.<\/strong><\/div>');
516 }
517 })(window, document);
518 //--><!]]></script></blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
519 Copyright &copy; 1999-2017, Apache Software Foundation
Hongqing Liufd5ee812014-05-10 16:32:51 +0800520 </em></font></div></td></tr></table></body></html>