You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Kedar Hirve <kh...@evincible.com> on 2001/07/09 23:37:52 UTC

My small, simple problem continued... (null container for my valv e)

Oh, WOW. It did work, and I didn't even have to modify Catalina's startup
classpath. I had tried putting the class under common\lib and server\lib,
but I didn't know that common\classes would work. But now I've got another
problem...


Again, I have this barebones valve class I wrote, and I've gotten it to load
up without exception in Catalina. Now, oddly enough, I find that my valve
has a null container, even though its nested in a context in my server.xml:

<Context className="org.apache.catalina.core.StandardContext" path="/"
debug="0" 
 docBase="/" reloadable="true">

   <Logger className="org.apache.catalina.logger.FileLogger" verbosity="1" 
    directory="/logs/kedlog" prefix="valvetest" timestamp="true" />

   <Valve className="org.apache.catalina.valvetest.KedValve" />
</Context>

Is there some initialization I need to do, or am I forgetting some tags in
my server.xml?

Thanks again,
-KSH

Re: My small, simple problem continued... (null container for my valve)

Posted by Remy Maucherat <re...@apache.org>.
> Oh, WOW. It did work, and I didn't even have to modify Catalina's startup
> classpath. I had tried putting the class under common\lib and server\lib,
> but I didn't know that common\classes would work. But now I've got another
> problem...

In the lib folders, you can only put jars. Un-jarred classes should be in
the classes folders. That's mentioned in the CL docs.

The best place to put your valve here is in server/classes/

> Again, I have this barebones valve class I wrote, and I've gotten it to
load
> up without exception in Catalina. Now, oddly enough, I find that my valve
> has a null container, even though its nested in a context in my
server.xml:
>
> <Context className="org.apache.catalina.core.StandardContext" path="/"
> debug="0"
>  docBase="/" reloadable="true">
>
>    <Logger className="org.apache.catalina.logger.FileLogger" verbosity="1"
>     directory="/logs/kedlog" prefix="valvetest" timestamp="true" />
>
>    <Valve className="org.apache.catalina.valvetest.KedValve" />
> </Context>
>
> Is there some initialization I need to do, or am I forgetting some tags in
> my server.xml?

Does your valve extend ValveBase or implement Contained ?

Remy