If the class exists in a jar archive inside $TOMCAT_HOME/server/lib or 
server/classes your webapps cannot see it.  Only the container sees 
that.  You can remedy this by moving the jar file that contains the class 
you want to common/lib.  That way, both the container and your webapp can 
see it.  plain lib (or shared/lib in Tomcat-4.1.x) is where you put classes 
that only your webapps can see.

Jake

At 12:35 PM 9/21/2002 +0100, you wrote:
>Hi all.
>
>I'm new to Tomcat4, although I've been using Tomcat3 for over two years. A
>major difference appears to be the classloader mechanism, which I'm having
>trouble getting to grips with. This leads to my question:
>
>Is it possible to write a class that extends the Tomcat4 WebdavServlet? If I
>try the obvious 'MyWebdavServlet extends WebdavServlet' in my own package, I
>get a ClassDefNotFound for org/apache/catalina/servlets/WebdavServlet when I
>try to call it. I guess this is something to do with the classloader,
>because if I put the same MyWebdavServlet into the
>org.apache.catalina.servlets package (which I know is a dodgy thing to do)
>and put that class under tomcat/server/classes, all works well...
>
>Can anyone explain this phenomenon? Has anyone written a class in their own
>package that extends WebdavServlet?
>
>Cheers
>Dave Small
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to