alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Tomcat example source code file (fs-admin-objects.xml)

This example Tomcat source code file (fs-admin-objects.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Tomcat tags/keywords

context, context, debugging, debugging, default, it, jdbc, logger, name, should, should, the, the, tomcat

The Tomcat fs-admin-objects.xml source code

<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!DOCTYPE document [
  <!ENTITY project SYSTEM "project.xml">
]>
<document url="fs-admin-objects.html">

  &project;

  <properties>
    <author email="craigmcc@apache.org">Craig McClanahan
    <title>Administrative Apps - Administered Objects
    <revision>$Id: fs-admin-objects.xml 562814 2007-08-05 03:52:04Z markt $
  </properties>

<body>


<section name="Administered Objects Overview">

<p>This document defines the Administered Objects that represent
the internal architectural components of the Catalina servlet container.
Associated with each is a set of <a href="fs-admin-opers.html">Supported
Operations</a> that can be performed when the administrative application is
"focused" on a particular configurable object.</p>

<p>The following Administered Objects are defined:

<ul> <li>Access Logger <li>Connector <li>Context <li>Default Context <li>Default Deployment Descriptor <li>Engine <li>Environment Entry <li>Host <li>JDBC Resource <li>Loader <li>Manager <li>Realm <li>Request Filter <li>Server <li>Service </ul> </section> <section name="Access Logger"> <p>An Access Logger is an optional Valve that can create request access logs in the same formats as those provided by web servers. Such access logs are useful input to hit count and user access tracking analysis programs. An Access Logger can be attached to an <em>Engine, a Host, a Context, or a Default Context</em>.

<p>The standard component implementing an Access Logger is <code>org.apache.catalina.valves.AccessLogValve. It supports the following configurable properties:</p> <ul> <li>debug - Debugging detail level. [0] <li>directory - Absolute or relative (to $CATALINA_HOME) path of the directory into which access log files are created. [logs].</li> <li>pattern - Pattern string defining the fields to be included in the access log output, or "common" for the standard access log pattern. See <code>org.apache.catalina.valves.AccessLogValve for more information. [common]</li> <li>prefix - Prefix added to the beginning of each log file name created by this access logger.</li> <li>resolveHosts - Should IP addresses be resolved to host names in the log? [false]</li> <li>suffix - Suffix added to the end of each log file name created by this access logger.</li> </ul> </section> <section name="Connector"> <p>A Connector is the representation of a communications endpoint by which requests are received from (and responses returned to) a Tomcat client. The administrative applications shall support those connectors that are commonly utilized in Tomcat installations, as described in detail below.</p> <p>For standalone use, the standard connector supporting the HTTP/1.1 protocol is <code>org.apache.catalina.connectors.http.HttpConnector. It supports the following configurable properties:</p> <ul> <li>acceptCount - The maximum queue length of incoming connections that have not yet been accepted. [10]</li> <li>address - For servers with more than one IP address, the address upon which this connector should listen. [All Addresses]</li> <li>bufferSize - Default input buffer size (in bytes) for requests created by this Connector. [2048]</li> <li>debug - Debugging detail level. [0] <li>enableLookups - Should we perform DNS lookups on remote IP addresses when <code>request.getRemoteHost() is called? [true]</li> <li>maxProcessors - The maximum number of processor threads supported by this connector. [20]</li> <li>minProcessors - The minimum number of processor threads to be created at container startup. [5]</li> <li>port - TCP/IP port number on which this Connector should listen for incoming requests. [8080]</li> <li>proxyName - Host name to be returned when an application calls <code>request.getServerName(). [Value of Host: header] <li>proxyPort - Port number to be returned when an application calls <code>request.getServerPort(). [Same as port] </li> </ul> </section> <section name="Context"> <p>A Context is the representation of an individual web application, which is associated with a corresponding <em>Host
. Note that the administrable properties of a <em>Context do not include any settings from inside the web application deployment descriptor for that application.</p> <p>The standard component implementing a Context is <code>org.apache.catalina.core.StandardContext. It supports the following configurable properties:</p> <ul> <li>cookies - Should be use cookies for session identifier communication? [true]</li> <li>crossContext - Should calls to <code>ServletContext.getServletContext() return the actual context responsible for the specified path? [false]</li> <li>debug - Debugging detail level. [0] <li>docBase - The absolute or relative (to the <code>appBase of our owning Host) pathname of a directory containing an unpacked web application, or of a web application archive (WAR) file.</li> <li>override - Should settings in this Context override corresponding settings in the <em>Default Context? [false]</li> <li>path - Context path for this web application, or an empty string for the root application of a <em>Host. [Inferred from directory or WAR file name]</li> <li>reloadable - Should Tomcat monitor classes in the <code>/WEB-INF/classes directory for changes, and reload the application if they occur? [false]</li> <li>useNaming - Should Tomcat provide a JNDI naming context, containing preconfigured entries and resources, corresponding to the requirements of the Java2 Enterprise Edition specification? [true]</li> <li>workDir - Absolute pathname of a scratch directory that is provided to this web application. [Automatically assigned relative to $CATALINA_HOME/work]</li> </ul> <p>Each Context is owned by a parent Host, and is associated with:</p> <ul> <li>An optional Access Logger that logs all requests processed by this web application.</li> <li>Zero or more Environment Entries representing environment entries for the JNDI naming context associated with a web application.</li> <li>Zero or more JDBC Resources representing database connection pools associated with a web application.</li> <li>A Loader representing the web application class loader used by this web application.</li> <li>A Manager representing the session manager used by this web application.</li> <li>An optional Realm used to provide authentication and access control information for this web application.</li> <li>Zero or more Request Filters used to limit access to this web application based on remote host name or IP address.</li> </ul> </section> <section name="Default Context"> <p>A Default Context represents a subset of the configurable properties of a <em>Context, and is used to set defaults for those properties when web applications are automatically deployed. A <em>Default Context</em> object can be associated with an Engine or a <em>Host. The following configurable properties are supported:

<ul> <li>cookies - Should be use cookies for session identifier communication? [true]</li> <li>crossContext - Should calls to <code>ServletContext.getServletContext() return the actual context responsible for the specified path? [false]</li> <li>reloadable - Should Tomcat monitor classes in the <code>/WEB-INF/classes directory for changes, and reload the application if they occur? [false]</li> <li>useNaming - Should Tomcat provide a JNDI naming context, containing preconfigured entries and resources, corresponding to the requirements of the Java2 Enterprise Edition specification? [true]</li> </ul> <p>Each Default Context is owned by a parent Engine or <em>Host, and is associated with:

<ul> <li>Zero or more Environment Entries representing environment entries for the JNDI naming context associated with a web application.</li> <li>Zero or more JDBC Resources representing database connection pools associated with a web application.</li> <li>An optional Loader representing default configuration properties for the Loader component of deployed web applications.</li> <li>An optional Manager representing default configuration properties for the Manager component fo deployed web applications.</li> </ul> </section> <section name="Default Deployment Descriptor"> <p>Default web application characteristics are configured in a special deployment descriptor named <code>$CATALINA_HOME/conf/web.xml. This section describes the configurable components that may be stored there.</p> <p>FIXME - Complete the description of default servlets, default mappings, default MIME types, and so on.</p> </section> <section name="Engine"> <p>An Engine is the representation of the entire Catalina servlet container, and processes all requests for all of the associated virtual hosts and web applications.</p> <p>The standard component implementing an Engine is <code>org.apache.catalina.core.StandardEngine. It supports the following configurable properties:</p> <ul> <li>debug - Debugging detail level. [0] <li>defaultHost - Name of the Host to which requests will be directed if the requested host is unknown. [localhost]</li> <li>name - Logical name of this engine. [Tomcat Stand-Alone] </li> </ul> <p>Each Engine is owned by a parent Service, and is associated with:</p> <ul> <li>An optional Access Logger that logs all requests processed by the entire container.</li> <li>A Default Context, representing default properties of a <em>Context for automatically deployed applications for all associated <em>Hosts (unless overridden by a subordinate component).</li> <li>One or more Hosts representing individual virtual hosts supported by this container.</li> <li>A Realm used to provide authentication and access control information for all virtual hosts and web applications (unless overridden by a subordinate component).</li> <li>Zero or more Request Filters used to limit access to the entire container based on remote host name or IP address.</li> </ul> </section> <section name="Environment Entry"> <p>An Environment Entry is the representation of a <code><env-entry> element from a web application deployment descriptor. It will cause the creation of a corresponding entry in the JNDI naming context provided to the corresponding <em>Context. The following configurable properties are supported:</p> <ul> <li>description - Description of this environment entry. <li>name - Environment entry name (relative to the <code>java:comp/env context) <li>type - Environment entry type (must be one of the fully qualified Java classes listed in the servlet spec).</li> <li>value - Environment entry value (must be convertible from String to the specified <code>type. </ul> </section> <section name="Host"> <p>A Host is the representation of an individual virtual host, which has a unique set of associated web applications.</p> <p>The standard component implementing a Host is <code>org.apache.catalina.core.StandardHost. It supports the following configurable properties:</p> <ul> <li>aliases - Zero or more DNS names that are also associated with this host (for example, a particular host might be named <code>www.mycompany.com with an alias company.com). </li> <li>appBase - Absolute or relative (to $CATALINA_HOME) path to a directory from which web applications will be automatically deployed.</li> <li>debug - Debugging detail level. [0] <li>name - DNS Name of the virtual host represented by this object.</li> <li>unpackWARs - Should web application archive files deployed by this virtual host be unpacked first? [true]</li> </ul> <p>Each Host is owned by a parent Engine, and is associated with:</p> <ul> <li>An optional Access Logger that logs all requests processed by this virtual host.</li> <li>One or more Contexts representing the web applications operating on this <em>Host. <li>A Default Context representing default Context properties for web applications that are automatically deployed by this <em>Host. <li>A optional Realm used to provide authentication and access control information for all web applications associated with this virtual host (unless overridden by a subordinate component).</li> </ul> <p>FIXME - Should we support configuration of the User Web Applications functionality?</p> </section> <section name="JDBC Resource"> <p>A JDBC Resources represents a database connection pool (i.e. an implementation of <code>javax.sql.DataSource that will be configured and made available in the JNDI naming context associated with a web application.</p> <p>FIXME - properties of this administered object

</section> <section name="Loader"> <p>A Loader represents a web application class loader that will be utilized to provide class loading services for a particular <em>Context.

<p>The standard component implementing a Loader is <code>org.apache.catalina.loader.StandardLoader. It supports the following configurable properties:</p> <ul> <li>checkInterval - Number of seconds between checks for modified classes, if automatic reloading is enabled. [15]</li> <li>debug - Debugging detail level. [0] <li>reloadable - Should this class loader check for modified classes and initiate automatic reloads? [Set automatically from the <code>reloadable property of the corresponding Context] </li> </ul> <p>Each Loader is owned by a parent Context.

</section> <section name="Manager"> <p>A Manager represents a session manager that will be associated with a particular web application. <strong>FIXME - Add support for advanced session managers and their associated Stores.</p> <p>The standard component implementing a Manager is <code>org.apache.catalina.session.StandardManager. It supports the following configurable properties:</p> <ul> <li>checkInterval - Number of seconds between checks for expired sessions. [60]</li> <li>debug - Debugging detail level. [0] <li>entropy - String initialization parameter used to increase the entropy (initial randomness) of the random number generator used to create session identifiers. [Inferred from engine, host, and context] </li> <li>maxActiveSessions - The maximum number of active sessions that are allowed, or -1 for no limit. [-1]</li> </ul> <p>Each Manager is owned by a parent Context.

</section> <section name="Realm"> <p>A Realm represents a "database" of information about authorized users, their passwords, and the security roles assigned to them. This will be used by the container in the implementation of container-managed security in accordance with the Servlet Specification. Several alternative implementations are supported.</p> <p>org.apache.catalina.realm.MemoryRealm initializes its user information from a simple XML file at startup time. If changes are made to the information in this file, the corresponding web applications using it must be restarted for the changes to take effect. It supports the following configurable properties:</p> <ul> <li>debug - Debugging detail level. [0] <li>pathname - Absolute or relative (to $CATALINA_HOME) path to the XML file containing our user information. [conf/tomcat-users.xml] </li> </ul> <p>org.apache.catalina.realm.JDBCRealm uses a relational database (accessed via JDBC APIs) to contain the user information. Changes in the contents of this database take effect immediately; however, the roles assigned to a particular user are calculated only when the user initially logs on (and not per request). The following configurable properties are supported:</p> <ul> <li>connectionName - Database username to use when establishing a JDBC connection.</li> <li>connectionPassword - Database password to use when establishing a JDBC connection.</li> <li>connectionURL - Connection URL to use when establishing a JDBC connection.</li> <li>debug - Debugging detail level. [0] <li>digest - Name of the MessageDigest algorithm used to encode passwords in the database, or a zero-length string for no encoding. [Zero-length String]</li> <li>driverName - Fully qualified Java class name of the JDBC driver to be utilized.</li> <li>roleNameCol - Name of the column, in the User Roles table, which contains the role name.</li> <li>userCredCol - Name of the column, in the Users table, which contains the password (encrypted or unencrypted).</li> <li>userNameCol - Name of the column, in both the Users and User Roles tables, that contains the username.</li> <li>userRoleTable - Name of the User Roles table, which contains one row per security role assigned to a particular user. This table must contain the columns specified by the <code>userNameCol and <code>roleNameCol properties. <li>userTable - Name of the Users table, which contains one row per authorized user. This table must contain the columns specified by the <code>userNameCol and userCredCol properties. </li> </ul> <p>FIXME - Should we provide mechanisms to edit the contents of a "tomcat-users.xml" file through the admin applications?</p> <p>Each Realm is owned by a parent Engine, Host, or <em>Context.

</section> <section name="Request Filter"> <p>FIXME - complete this entry

</section> <section name="Server"> <p>FIXME - complete this entry

</section> <section name="Service"> <p>FIXME - complete this entry

</section> </body> </document>

Other Tomcat examples (source code examples)

Here is a short list of links related to this Tomcat fs-admin-objects.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.