tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Anderson <ander...@mitre.org>
Subject Re: How Do I Install A Valve
Date Mon, 03 Jan 2005 17:46:38 GMT
Thanks for the advice.  I had originally put my class in 
org.apache.catalina.valves to avoid any problems with access to protected 
fields and methods.  After reading your reply, I studied the Tomcat classes 
and determined that there would be no problems.  So, I have moved my class 
to my own package, bundled it into a jar, and put it in 
CATALINA_HOME/server/lib.  Works like a charm!

- Mark

Benson Margulies wrote:

> To begin with, unless you are planning to submit your valve as a patch
> for inclusion, I wouldn't recommend putting it in org.apache.anything.
> 
> Since Valves run inside the server, not inside the web app, they need to
> be in the server classpath. You can either do what you did or edit
> catalina.properties. 
> 
> -----Original Message-----
> From: Mark Anderson [mailto:anderson@mitre.org] 
> Sent: Thursday, December 30, 2004 4:48 PM
> To: Tomcat Users List
> Subject: Re: How Do I Install A Valve
> 
> Through some trial and error, I solved the problem.
> 
> The class file apparently needs to be under
> CATALINA_HOME/server/classes. 
> If one bundles it into a jar file, the jar needs to be in
> CATALINA_HOME/server/lib.
> 
> I'm real new to Tomcat, so I don't know if this is really the place to
> put it.  Is there anyone who can advice on "best practices"?  Is there a
> better (or another) place to put this valve?
> 
> Thanks,
> 
> - Mark
> 
> Mark Anderson wrote:
> 
> 
>>Hi.
>>
>>I've written a Valve that I will configure inside the <Engine> element
> 
> 
>>in server.xml.  I've made my valve class part of the 
>>org.apache.catalina.valves package. My questions is this:
>>
>>Where to I put the class file so that Tomcat can use it?
>>
>>(I'm using Tomcat 5.0.27.)
>>
>>- Mark
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

-- 
Mark Anderson                                voice:703-883-6508
Networking & Distributed Systems Engineer    fax  :703-883-5864
The MITRE Corporation                        email:anderson@mitre.org


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


Mime
View raw message