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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





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


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


-- Mark Anderson voice:703-883-6508 Networking & Distributed Systems Engineer fax :703-883-5864 The MITRE Corporation email:[EMAIL PROTECTED]


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



Reply via email to