Home > Documentation > Configuring and administering > Configuring and administering the Apache Geronimo Server > Configuring the Web Container > Managing Valve |
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.
Currently, the valve cannot be configured by using the administration console. Tomcat valves are initially defined in the <geronimo_home>/repository/org/apache/geronimo/configs/tomcat6/2.2/tomcat6-2.2.car/META-INF/plan.xml
file. To change valves configuration, you must modify <Geronimo_home>/var/config/config.xml
.
The following sections illustrate common changes that you might want to make to your valve chain.
By default, the initial configuration of the server 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 by using the same format as those created by standard Web servers. These logs can later be analyzed by the administration 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. 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, use the following procedure:
<geronimo_home>/var/config/config.xml
file and then open it in an editor.This section takes the Single Sign-on Valve as an example. 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, use the following procedure:
<geronimo_home>/var/config/config.xml
file and then open it in an editor.org.apache.catalina.authenticator.SingleSignOn
in the <attribute name="className"> </attribute>
block.Valves chained to the Tomcat engine are invoked for requests received by all the virtual hosts. In some cases, you might want to customize the valve chain for a given host. In this case, use the following procedure:
<geronimo_home>/var/config/config.xml
file and then open it in an editor.Bookmark this on Delicious Digg this | Privacy Policy - Copyright © 2003-2013, The Apache Software Foundation, Licensed under ASL 2.0. |