tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ming Zhou <mz...@tps-software.com>
Subject [Classloader/executable jar] Classes visible to jasper-runtime, b ut not jasper-compiler
Date Tue, 15 Apr 2003 18:23:41 GMT
We are starting Tomcat4 as a thread within our app. If app specific jars are
set in the environment classpath, they are picked up properly.

After I made an executable jar, e.g. "java -jar myapp.jar", that includes
all the related jars in the manifest class-path, JSP pages can't be compiled
any more due to undefined app-specific classes. (I'm using executable jars
to simplify cross-platform deployment.)

Here is a snapshot to my directory structure:
/app_home (run "java -jar myapp.jar" in here)
  myapp.jar (using lib/*.jar and tomcat4/bin/bootstrap.jar in the manifest)
  /lib
    /*.jar
  /tomcat4
    /bin
      /bootstrap.jar
    /webapps
      /app1
      /app2
    /work

The interesting thing is that if I have JSP pages that had been compiled
before in the work directory, they can still be run without any problem
until I delete the classes and try reloading the pages. So it appears that
Jasper runtime can see classes referred in the executable jar, but Jasper
compiler can't.

Question #1: Can someone explain this difference to me?

Question #2: I'm aware of the classloader tree in tomcat. Since we use the
system classloader to run bootstrap, shouldn't the bootstrap classloader and
all of its descendants inherit the class-path defined in the manifest of the
executable jar?

I appreciate any insight into this issue.

-ming,


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message