Versions Compared

Key

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

...

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.

  1. Stop the server;
  2. Backup <Geronimo_home>/var/config/config.xml file and then open it in an editor.
  3. Add the following code right after <module name="org.apache.geronimo.configs/tomcat6/2.2/car"> tag to disable the Access Log Valve, and then restart the server after you save the file.
    Code Block
    <module name="org.apache.geronimo.configs/tomcat6/2.2/car">
    ...
        <gbean name="TomcatEngine">
            <attribute name="initParams">
                name=Geronimo
            </attribute>
            <reference name="TomcatValveChain"/>
        </gbean>
        <gbean name="AccessLogValve" load="false"></gbean>
    ...
    

Add a second Value

Let's take the Single Sign-on Valve as an example here. The Single Sign-on Valve is used to give users the ability to sign on to any Web application and then have their identity recognized by all other Web applications within the same container. To add the Single Sign-on Valve to the Access Log Valve in the initial valve chain, follow the procedure below.

...

  • The j2eeType= attribute in the added <gbean> tags have been split across several lines for readability. In your file, the attribute must be on a single line. Also you can add the other Valves by simply replacing org.apache.catalina.authenticator.SingleSignOn in <attribute name="className"> </attribute> block.

Configure a valve chain

Valves chained to the Tomcat engine are invoked for requests received by all the virtual hosts. In some cases, you may want to customize the valve chain for a given host. In this case, use the following procedure.

...