• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDEfFound Error

 
Prasad Subramanaian
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
| -WEB-INF
||- classes
|||- super.class
|
| -jsp
|-direct
|-thejspinquestion.jsp
Thanks in advance
Prasad
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic