Permalink to this page: https://cwiki.apache.org/confluence/x/tSklBg
This page discusses the various ways you see Class Not Found errors or very similar errors. It is strongly advised you read the following topics:
If you get a NoClassDefFoundError
exception, the root cause might be the same as for a ClassNotFound
exception.
jsp:useBean
is not working?Make sure:
You have fully qualified your class name (e.g.: com.bar.package.MyClass
) OR
You have imported your class into your jsp (e.g.: <%@ page import="com.bar.package.MyClass"%>
)
java.lang.NoClassDefFoundError: javax/servlet/Filter
?You probably have servlet-api.jar floating around somewhere it shouldn't be. This really messes up the classloaders since Tomcat's classloaders don't act quite as normal as one expects (see links above). servlet-api.jar should only be found only once in $CATALINA_HOME/lib.
java.lang.NoClassDefFoundError: org/xml/sax/InputSource
?You have conflicting XML api jar files in your classpath. Read the README or RELEASE-NOTES for more information.