tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zach Cox <>
Subject Custom Valve
Date Fri, 18 Apr 2008 19:49:55 GMT

I'm using Tomcat 6.0.14 and need to write a custom Valve to control the
Domain property of the JSESSIONID cookie (so it will be reused on any
subdomain) but I can't find any documentation on how to go about creating a
custom Valve.

Could someone please let me know if this is accurate?
 - extend the org.apache.catalina.valves.ValveBase class
 - implement the invoke method
 - package that up into a .jar file
 - put that .jar file into Tomcat's lib directory (alongside catalina.jar,
 - edit server.xml to look like this:
    <Engine name="Catalina"...
        <Valve className="com.whatever.MyCustomValve"/>
 - restart Tomcat

I've done all of the above, yet I don't see the desired effects of my Valve
nor do I see any of its System.out.println statements in catalina.out but
I'm not sure what I'm doing wrong.
View this message in context:
Sent from the Tomcat - User mailing list archive at

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message