The Host Element


The Host Element

A Host element represents a virtual host configuration. It is a container for web applications with a specified DNS hostname. The child elements supported by the embedded service include Alias, Logger, DefaultContext, Valve, and Listener. The supported attributes include the following:

  • className This is the fully qualified classname of the org.apache.catalina.Host interface implementation to use. If not specified, it defaults to org.apache.catalina.core.StandardHost.

  • name This is the DNS name of the virtual host. At least one Host element must be configured with a name that corresponds to the defaultHost value of the containing Engine element.

The Alias element is an optional child element of the Host element. Each Alias element's content specifies an alternate DNS name for the enclosing Host.

You can find additional information on the Host element in the Tomcat documentation at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html.

The DefaultContext Element

The DefaultContext element is a configuration template for web application contexts. It can be defined at the Engine or Host level. The child elements supported by the embedded service include WrapperLifecycle, InstanceListener, WrapperListener, and Manager. The supported attributes include the following:

  • className This is the fully qualified classname of the org.apache.catalina.core.DefaultContext implementation. It defaults to org.apache.catalina.core.DefaultContext, and if it is overridden, it must be a subclass of DefaultContext.

  • cookies This flag indicates whether sessions will be tracked by using cookies. The default is true.

  • crossContext This flag indicates whether the ServletContext.getContext(String path) method should return contexts for other web applications deployed in the calling web application's virtual host. The default is false.

The Logger Element

The Logger element specifies a logging configuration for the Tomcat instance. The supported attributes include the following:

  • className This is the fully qualified classname of the org.apache.catalina.Logger interface implementation. For integration with JBoss logging, this should be set to org.jboss.web.tomcat.Log4jLogger.

  • verbosity This is the default log level.

  • category This is the default log category.

The Valve Element

The Valve element configures a hook into the request-processing pipeline for the web container. The Valve element must implement the org.apache.catalina.Valve interface. There is only one required configuration attribute, className, which is the fully qualified classname of the org.apache.catalina.Valve interface implementation. The most commonly used Valve element is AccessLogValve, which keeps a standard HTTP access log of incoming requests. The className for the access log value is org.jboss.web.catalina.valves.AccessLogValue. The additional Valve attributes that it supports include the following:

  • directory This is the directory path into which the access log files will be created.

  • pattern This pattern specifier defines the format of the log messages. It defaults to common.

  • prefix This is the prefix to add to each log file name. It defaults to access_log.

  • suffix This is the suffix to add to each log file name. It defaults to an empty string, meaning that no suffix will be added.

You can find additional information on the Valve element and the available valve implementations in the Tomcat documentation at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/valve.html.



JBoss 4. 0(c) The Official Guide
JBoss 4.0 - The Official Guide
ISBN: B003D7JU58
EAN: N/A
Year: 2006
Pages: 137

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net