You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Ma...@tivoli.com on 2000/07/26 13:34:12 UTC

Tomcat class loader needs

We have been working with Tomcat for several months.  The changes in the class
loader have been moving in the direction that we need but we have not been able
to wrapper Tomcat within a Java application as yet without modifying Tomcat.

We need to run tomcat embedded in a JVM where:

   - Tomcat is started on it own thread by a  Java application
   - Tomcat is loaded by a classloader with an additional classloader between it
   and the system classloader
   - the system classloader is not used for application code (only 1 jar file
   needed to start framework in system classpath)

Problems we have run into:

   - Tomcat cannot find its own classes (webserver.jar etc) since Tomcat creates
   classloader(s) that do not set their parent
      classloader, but go directly to the system classloader.  Tomcat code
   appears to be changing to support
      this type of environment, but the 3.2 beta level of code does not work for
   this environment.

   - When JSPs are compiled the tomcat classes and other classes from the parent
   classloader are not found. Tomcat
     expects these type of classes to be found using the Java classpath system
   property (java.class.path)  which
     only has 1 class for our environment. We need a way to get the classes
   available from our classloaders to be found
     without having to store them (jar file names) in the above system property
   or store a duplicate copy somewhere
     in the Tomcat directory structure.

We can provide changes that we have made to enable us to use Tomcat within a
Java application.

Mac Holloway