You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ming Zhou <mi...@acs-inc.com> on 2003/04/18 20:12:32 UTC

RE: [Classloader?] Executable jar classes not visible to jasper-c ompi ler

Thanks replying.

According to that doc, the system loader is above the shared one which is
responsible for Jasper. If the system loader loads all the jars specified in
the executable jar's manifest, shouldn't the shared loader see them?

As mentioned in my original message, the Jasper runtime can see the app
level classes, but the jasper compiler can't. Since they both are supported
by the shared loader in the tomcat doc, I wonder why they behave
differently.

Can someone also tell me whether the system loader under tomcat bootstrap
loader is the same instance as that's loading my executable jar? I figure if
they are different instances, there might be some inconsistency about the
classpathes.

-ming,

-----Original Message-----
From: Tim Funk [mailto:funkman@joedog.org] 
Sent: Friday, April 18, 2003 12:18 PM
To: Tomcat Users List
Subject: Re: [Classloader?] Executable jar classes not visible to
jasper-compi ler

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

[OT] I wish there were more indepth links/guides on embedding tomcat. Does 
anyone know of any?

-Tim

Ming Zhou wrote:
> Sorry if you have received this message more than once. I just really want
> to get some input from this list.
> 
>  
> 
> --------------------------
> 
> 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

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