tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Setting the classpath for my application
Date Mon, 24 Jul 2006 20:34:52 GMT
Darren,

> My jar file (foo.jar) is in the
> webapps/abc/WEB-INF/lib directory for my 'abc' application. However, in the
> Catalina log file, when Tomcat starts, I get a "ClassNotFound -
> com.abc.framework.ControlServlet" error. Why can my servlet not be found if
> it resides in the jar under the WEB-INF/lib directory???

Can you confirm with "jar tvf webapps/abd/WEB-INF/lib/abc.jar" that your
class is actually in there with the path
"com/abc/framework/ControlServlet.class"?

Another thing you could try is this:

$ javap -classpath webapps/abc/WEB-INF/lib/abc.jar  \
                   com.abc.framework.ControlServlet

This should print out the API of your class. If it does not, then either
the JAR is broken or the package and class names are incorrect.

-chris



Mime
View raw message