You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Korakaki Stella <sk...@koutcons.gr> on 2002/03/28 09:48:46 UTC
java.lang.NoClassDefFoundError
I've placed my servlet in the directory :
$CATALINA_HOME/webapps/ROOT/WEB-INF/classes/Login.class
and I've written the following at the
$CATALINA_HOME/webapps/ROOT/WEB-INF/web.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>
login
</servlet-name>
<servlet-class>
Login
</servlet-class>
</servlet>
</web-app> .
Also, I've placed my .jar file at the directory :
$CATALINA_HOME/webapps/ROOT/WEB-INF/lib/jCo.jar .
When I try to reach the address http://localhost/servlet/login it seems
that tomcat can't find my .jar file. I've tried a simple servlet with no
specific dependencies and worked fine.
Please someone tell me what to do in order to have my servlet working...!!!!
Stella Korakaki
Koutoudis Consulting
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: java.lang.NoClassDefFoundError
Posted by Jean-pierre Cartal <je...@nextenso.com>.
I had a similar problem a few days ago when one of my class located
under common/lib was implementing an interface defined in a jar located
under WEB-INF/lib, this gives a java.lang.NoClassDefFoundError since the
common/lib classloader can't access the jar located under WEB-INF/lib to
check the class signature...
Hope this helps.
Korakaki Stella wrote:
> I've placed my servlet in the directory :
>
>$CATALINA_HOME/webapps/ROOT/WEB-INF/classes/Login.class
>
>and I've written the following at the
>$CATALINA_HOME/webapps/ROOT/WEB-INF/web.xml :
>
><?xml version="1.0" encoding="ISO-8859-1"?>
>
><!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
>
><web-app>
><servlet>
> <servlet-name>
> login
> </servlet-name>
> <servlet-class>
> Login
> </servlet-class>
></servlet>
></web-app> .
>
>Also, I've placed my .jar file at the directory :
>
>$CATALINA_HOME/webapps/ROOT/WEB-INF/lib/jCo.jar .
>
>When I try to reach the address http://localhost/servlet/login it seems
>that tomcat can't find my .jar file. I've tried a simple servlet with no
>specific dependencies and worked fine.
>
>Please someone tell me what to do in order to have my servlet working...!!!!
>
>Stella Korakaki
>Koutoudis Consulting
>
>
>--
>To unsubscribe: <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>