tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Ramirez" <>
Subject ClassNotFoundException
Date Wed, 27 Feb 2002 05:11:27 GMT
Hope someone can help:

I have a TOMCAT app containing a servlet as follows:


This class extends a base class that provides common functionality for
all of my apps, and is stored in:

<TOMCAT_HOME>/common/classes/com/mycomp/MyBaseServletClass.class  (which
extends HttpServlet)

Through some context information, the MyBaseServletClass receives the
classname of a class stored in my app's classes directory, 
which it is responsible for creating an instance of, using
Class.forName().  This is the path of the class to be created:


When the MyServletClass calls Class.forName, it fails with a
ClassNotFoundException, but if I move the MyServletClass 
to the MyApp/WEB-INF/classes path, everything works fine.

What gives?  I thought that Tomcat reads adds the classes directory for
all of the apps deployed in the server.xml 
(with Context info), which I defined as follows:

   <Context path="/MyApp" docBase="MyApp" debug="0" reloadable="true" />


Ken Ramirez - Principal/CTO
Master-Mind Consulting Services <> 
Ph - 570-688-9600
Fx - 208-275-2301

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message