File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes NoClassDEfFound Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "NoClassDEfFound Error" Watch "NoClassDEfFound Error" New topic

NoClassDEfFound Error

Prasad Subramanaian

Joined: Feb 22, 2001
Posts: 3
Hi ,
I am using TOMCAT as a web server.
I have a jsp that uses a extend directive to extend a super class.
The .class file is in WEB-INF/classes subdirectory of the application home directory in teh server. Yet when I run the JSP i get a NoClassDefFound Error.
Any idea why ??
This is the dir structure :
jsptest (home)
||- classes
|||- super.class
| -jsp
Thanks in advance
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
I suggest that you carefully examine the Java source code that Tomcat generated from your JSP page to see if you can figure out where it expects to find the base class.
If you don't have the base class in a package, I suggest you put it in one. If the compiler sees a bare class name, it looks in the "current" directory instead of the WEB-INF/classes. This also affects Bean classes.
I agree. Here's the link:
subject: NoClassDEfFound Error
It's not a secret anymore!