What is a Valve?

A Valve is not defined in the Servlet/JSP spec, it is Tomcat specific. From the Tomcat docs:
A Valve element represents a component that will be inserted into the request processing pipeline for the associated Catalina container (Engine, Host, or Context).

For example, with the valve Remove Address Filter, you can decide whether or not to continue processing the request based on a regular expression that takes as input the IP address of the client.

You associate a Valve with a particular container (Engine, Host, or Context) in server.xml.

Check out the Q/A’s on how to use the Valves that come with Tomcat, and how to write your own.