The Apache Tomcat Servlet/JSP Container

Apache Tomcat 6.0

Apache Logo

Links

Top Level Elements

Executors

Connectors

Containers

Nested Components

Cluster Elements

Global Settings

Apache Tomcat Configuration Reference

The LifeCycle Listener Component

Introduction

A Listener element defines a component that performs actions when specific events occur, usually Tomcat starting or Tomcat stopping.

Listeners may be nested inside a Server, Engine, Host or Context. Some Listeners are only intended to be nested inside specific elements. These constraints are noted in the documentation below.

Attributes
Common Attributes

All implementations of Listener support the following attributes:

AttributeDescription
className

Java class name of the implementation to use. This class must implement the org.apache.catalina.LifecycleListener interface.

Standard Implementation

Unlike most Catalina components, there are several standard Listener implementations available. As a result, the className attribute MUST be used to select the implementation you wish to use.

APR Lifecycle Listener (org.apache.catalina.core.AprLifecycleListener)

The APR Lifecycle Listener checks for the presence of the APR/native library and loads the library if it is present. For more information see the APR/native guide.

This listener must only be nested within Server elements.

The following additional attributes are support by the APR Lifecycle Listener:

AttributeDescription
SSLEngine

Name of the SSLEngine to use. off: Do not use SSL, on: Use SSL but no specific ENGINE. The default value is on. This initializes the native SSL engine, which must be enabled in the APR/native connector by the use of the SSLEnabled attribute.

See the Official OpenSSL website for more details on supported SSL hardware engines and manufacturers.

Jasper Listener (org.apache.catalina.core.JasperListener)

The Jasper Listener initialises the Jasper 2 JSP engine before any web applications that may use it are loaded. For more information on the Jasper 2 JSP engine see the Jasper How To.

This listener must only be nested within Server elements.

No additional attributes are support by the Jasper Listener .

Server Lifecycle Listener (org.apache.catalina.mbeans.ServerLifecycleListener)

The Server Lifecycle Listener initialises the MBeanServer for the MBeans that may be used to manager Tomcat via JMX. Without this listener, none of the Tomcat MBeans will be available.

This listener must only be nested within Server elements.

No additional attributes are support by the Server Lifecycle Listener.

Global Resources Lifecycle Listener (org.apache.catalina.mbeans.GlobalResourcesLifecycleListener)

The Global Resources Lifecycle Listener initialises the Global JNDI resources defined in server.xml as part of the Global Resources element. Without this listener, none of the Global Resources will be available.

This listener must only be nested within Server elements.

No additional attributes are support by the Global Resources Lifecycle Listener.

Nested Components

No element may be nested inside a Listener.


Copyright © 1999-2008, Apache Software Foundation