Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt

In Tomcat, a valve is a Java class that can be inserted into the request processing pipeline. A valve executes as part of Tomcat's servlet container and is independent of the Web application.

Valves run in a chain where the last link in the chain is the Web application itself. Each valve performs its request processing, calls the next valve in the chain, performs its response processing, and returns to the valve that called it. See the Tomcat valve component for more information on the valves provided in the Tomcat library.

Currently, the valve cannot be configured using the Administrative console. Tomcat valves are initially defined in the <Geronimo_home>/repository/org/apache/geronimo/configs/tomcat6/2.2/tomcat6-2.2.car/META-INFplan.xml file; To change valves configuration you must modify <Geronimo_home>/var/config/config.xml.

The following sections illustrate common changes you may want to make to your valve chain.

Table of Contents

Disable the Access Log Valve

By defaultWhen you install your server, the initial configuration contains one valve referenced by the Tomcat engine. That valve is the Access Log Valve. This value is used to create log files that record every request used to access the Web container using the same format as those created by standard Web servers. These logs can later be analyzed by the administrative console and other standard log analysis tools to track page hit counts, user session activity, and so on. The files produced by this valve are rolled over nightly at midnight. Its classname is org.apache.catalina.valves.AccessLogValve and its GBean name is AccessLogValve.

Currently, the valve chain cannot be configured using the Administrative console. Tomcat valves are initially defined in the <Geronimo_home>/repository/org/apache/geronimo/configs/tomcat6/2.2/tomcat6-2.2.car/META-INFplan.xml file; To change valves configuration you must modify <Geronimo_home>/var/config/config.xml.

The following sections illustrate common changes you may want to make to your valve chain.

Table of Contents

Disable the Access Log Valve

In some cases, administrators are not interested in logging information about the requests sent to the server and want to remove the overhead of the Access Log Valve. To remove the Access Log Valve from the valve chain, follow the procedure below.

...