Try using the following in your web.xml file.  I added the servlet-mapping
tags.

<web-app>
<servlet>
    <servlet-name>
         login
    </servlet-name>
    <servlet-class>
         Login
    </servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>login</servlet-name>
    <url-pattern>/login</url-pattern>
</servlet-mapping>
</web-app>



-----Original Message-----
From: Jean-pierre Cartal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 12:33 PM
To: Tomcat Users List
Subject: Re: java.lang.NoClassDefFoundError


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:   <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to