I've edited the web.xml file to contain the following:

<?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>Testing</servlet-name>
                <servlet-class>TestingServlet</servlet-class>
        </servlet>

    <servlet-mapping>
        <servlet-name>Testing</servlet-name>
        <url-pattern>/Testing</url-pattern>
    </servlet-mapping>

</web-app>


I've set up a directory structure for this app exactly like the servlet
examples structure and after making changes to web.xml I'm recieving the
following root cause error:

java.lang.NoClassDefFoundError: TestingServlet (wrong name:
myApp/TestingServlet)

-----Original Message-----
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 11:57 AM
To: Tomcat Users List
Subject: Re: Deploying a simple servlet


Leon,

> I'm new to tomcat and am trying to run a very simple hello world type of
> servlet.  I've configured the web.xml to mimic a similar servlet in tomcat
> examples.  Still while all the example servlets from tomcat work mine
fails
> to run.
>
> I receive the following message:
>
> HTTP Status 404 - /MyApp/servlet/Testing
>
> I would greatly appreciate any advice.

In the newer versions of Tomcat, the 'invoker' servlet is disabled by
default. The best way to get your servlet running it to create a
<servlet-mapping> element in your web.xml and then use your mapped URL
to access the servlet (instead of using a URL like
/context/servlet/ClassName).

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to