s*********n 发帖数: 38 | 1 I read the Tomcat5.0 documentation here:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html
and I learn about another thing: The "System" classloader doesn't load classes
from CLASSPATH environment. IF I can instruct the "System" classLoader to load
classes from CLASSPATH, my problem will be solved, although it is not so
elegent.
Anyone here has the expertise to instruct "system" classloader to load classes
from CLASSPATH?
Thanks! | m******t 发帖数: 2416 | 2
You should not put class A in shared if it's part of a web app.
You might want to look deeper into Tomcap documentation about how
each web app has its own classloader, etc.
【在 s*********n 的大作中提到】 : I read the Tomcat5.0 documentation here: : http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html : and I learn about another thing: The "System" classloader doesn't load classes : from CLASSPATH environment. IF I can instruct the "System" classLoader to load : classes from CLASSPATH, my problem will be solved, although it is not so : elegent. : Anyone here has the expertise to instruct "system" classloader to load classes : from CLASSPATH? : Thanks!
| s*********n 发帖数: 38 | 3 I want to share the class A to different applciations, so I try to put it into
shared/ directory. Now the classes in different web app can discover the class
A, but class A could not discover the classes inside web app.
I can only find one page about the tomcat classloader from its offical
website. Could you recommend me some more? thanks!
classes
load
classes
【在 m******t 的大作中提到】 : : You should not put class A in shared if it's part of a web app. : You might want to look deeper into Tomcap documentation about how : each web app has its own classloader, etc.
| m******t 发帖数: 2416 | 4
cang said it below - you can't do that.
Not sure why you want to do that, but it's generally not a
good idea to share classes across web applications by putting
the classes on the server classpath - web applications are supposed
to be self-contained.
【在 s*********n 的大作中提到】 : I want to share the class A to different applciations, so I try to put it into : shared/ directory. Now the classes in different web app can discover the class : A, but class A could not discover the classes inside web app. : I can only find one page about the tomcat classloader from its offical : website. Could you recommend me some more? thanks! : : classes : load : classes
|
|