tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph Samuel" <>
Subject RE: Servlet class not found
Date Wed, 24 Nov 2004 11:35:23 GMT

It seems that the package is not properly declared in it. Check it.

-----Original Message-----
From: Richard Lewis []
Sent: Wednesday, November 24, 2004 4:51 PM
Subject: Servlet class not found


This is probably quite a simple question but I couldn't find an answer
in the archives:

I'm writing a servlet to perform a little search on my website. The
servlet is compiled and is in a directory structure like this:

   +-- index.html   (provides a form to do a test search)
   +-- WEB-INF/
        +-- web.xml   (see below)
        +-- classes/
             +-- uk/
                  +-- ac/
                       +-- uea/
                            +-- studios/
                                 +-- StudioSearch.class

web.xml looks like this:

When I visit: http://localhost:8080/StudioSearch/ I get the index page
as expected. This page has a <form> element where the action is
"studio-search" but when I submit this form I get the following error:

javax.servlet.ServletException: Error allocating a servlet instance
java.lang.NoClassDefFoundError: uk/ac/uea/studios/StudioSearch (wrong
name: StudioSearch)
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(

I've checked all the spelling and case and that I'm not using '.class'
(the file isn't confusing it, is it?) but I can't seem
to make it work. (I know the servlet class itself works because I've
executed it Tomcat's ROOT webapp.)

Any ideas?

  Richard Lewis

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message