You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Joseph S <jk...@selectacast.net> on 2007/07/10 02:39:19 UTC

How do I develop a Valve?

1) What jar files do I need to include in my classpath to compile a Valve?
2)  Where do I put the class file so Tomcat can load it?  Under 
CATALINA_BASE/common?

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


Re: How do I develop a Valve?

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
Joseph, I looked at this once and remember seeing a good article somewhere, 
sure if you google for Tomcat and valve you will find it.

The best way is actually to download the source code and just copy an 
existing one that is close to what you looking for, you will then also pick 
up on all the dependencies as well.

After researching it I decided not to use valves.... because they are very 
dependent on the Tomcat engine and different between versions. So just keep 
in mind that your development will never end. Its one of the reasons TC 
users avoid tools using valves... unless they maintained like the standard 
valves are... they wont move between versions.

In my case I was able to use a filter instead of a valve... if thats at all 
possible in your case, rather go for a filter.

----- Original Message ----- 
From: "Joseph S" <jk...@selectacast.net>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Tuesday, July 10, 2007 2:39 AM
Subject: How do I develop a Valve?


> 1) What jar files do I need to include in my classpath to compile a Valve?
> 2)  Where do I put the class file so Tomcat can load it?  Under 
> CATALINA_BASE/common?
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 


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


Re: How do I develop a Valve?

Posted by Bill Barker <wb...@wilshire.com>.
"Joseph S" <jk...@selectacast.net> wrote in message 
news:4692D537.7010409@selectacast.net...
> 1) What jar files do I need to include in my classpath to compile a Valve?

I'm assuming that this is for 5.5.  Usually you just need catalina.jar, but 
in some cases you might need tomcat-utils.jar and tomcat-coyote.jar (if you 
want to interact with the Connector).

> 2)  Where do I put the class file so Tomcat can load it?  Under 
> CATALINA_BASE/common?

You put it under CATALINA_HOME/server/classes, or CATALINA_HOME/server/lib 
(if it is in a .jar file, which is recommended, if only so you have the 
class and the mbeans-descriptors.xml file in the same place).
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 




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