tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jake Vang <>
Subject Filter versus Valve
Date Thu, 12 Feb 2009 05:13:09 GMT
I've been looking for a way to modify my request header. I found that
implementing javax.servlet.Filter is the way to go. However, I noticed that
once after I got my Filter implementation working, my Valve is no longer
reached (I created my own Valve subclassing
org.apache.catalina.valves.ValveBase). I've determined this because I've
placed breakpoints in the Filter.doFilter(...) method and Valve.invoke(...)
methods, and only the breakpoint in the Filter class implementation is

My context XML for my web application is:

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/my-valve"
    <Valve className="vang.jake.tomcat.valve.ModifyHeaderValve" />

My web.xml for my web application is:


Could someone clarify if the use of one (filter) precludes the use of the
other (valve)? If so, why? If not, why is my valve never reached?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message