You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gregor Schneider <rc...@googlemail.com> on 2009/01/06 13:05:37 UTC

Tutorial for implementing a valve

Dear all,

I'd like to try something in Tomcat 6, and therefore I have to
implement it as a valve.

I know that I have to implement org.apache.catalina.valve, however, I
got no clue where to start.

- In which jar among all the jars delivered with Tomcat do I find the interface?
- Once having the valve created, where do I put it (will
${CATALINA_HOME}/webapps/${myApp}/WEB-INF/lib be ok)?
- Anybody knows about a tutorial or how-two?

TIA

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tutorial for implementing a valve

Posted by Pid <p...@pidster.com>.
Gregor Schneider wrote:
> Dear all,
> 
> I'd like to try something in Tomcat 6, and therefore I have to
> implement it as a valve.
> 
> I know that I have to implement org.apache.catalina.valve, however, I
> got no clue where to start.
> 
> - In which jar among all the jars delivered with Tomcat do I find the interface?
> - Once having the valve created, where do I put it (will
> ${CATALINA_HOME}/webapps/${myApp}/WEB-INF/lib be ok)?
> - Anybody knows about a tutorial or how-two?

AFAIK catalina.jar is the place to look.

I think that you probably want to extend ValveBase instead of just
implementing the interface too.

In essence, I've found Valves to be quite similar to Filters at the most
basic level.  Adding the Lifecycle interface makes things a little more
complicated.

I pulled the AccessLogValve apart when I first played with them.


p


> TIA
> 
> Gregor


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org