A Valve is just like a Servlet Filter but tomcat specific. They are run early enough in the request lifecycle that you can change different behaviors of how things work. But a Valve also has access to tomcat's internals, something servlet filters don't have.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/valve.html

-Tim

Markus Krogemann wrote:

Thanks Yoav, Martin, Tim

You're right, ServletApi's Filter appears to be a simple solution. I somehow didn't expect that I could just do something like:

    response = new ResponseWrapper(response)

in the doFilter method, but of course it works, because the wrapper is just passed on to the next elements in the chain, I guess.

Our design is not that nice, I know. I would much prefer to use only one tomcat but that is unfortunately not an option right now and sessions will have to be maintained independently on both servers.

Tim: What are these valves you mentioned?

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to