Yoav, Thank you so much for confirming what I had basically already figured out. I think, originally, we had other things running on our Tomcat machines (web-service processes) and it made it easier to develop apps with those jars included. I am currently asking them to move all of these jars to /tomcat/common/lib/ or /tomcat/shared/lib/. That way, if I want to use those jars, I can. But if I want to override them, I can. :) It's either that or remove them altogether from the machine and make each webapp carry around all jars - which really isn't so terrible.
Thanks again.
Charlie
Shapira, Yoav wrote:
Howdy,
I have readThis
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
many times over and I am still confused. The Overview relates parent
and children
classloaders to each other. It then says that the Java 2 way is to put
the Bootstrap
classloader first. It then states that Tomcat does it a little bit
differently, the
details of which are stated below. In the Class Loader Definitions
section it says
that the /WEB-INF/classes/ comes first, with /WEB-INF/lib/ second.
is all
exactly as I would like to see it.
Bootstrap is still first, as is required in Java 2. Specifically, note the following summary on the page you quoted above: "Therefore, from the perspective of a web application, class or resource loading looks in the following repositories, in this order:
Bootstrap classes of your JVM System class loader classses (described above) /WEB-INF/classes of your web application /WEB-INF/lib/*.jar of your web application $CATALINA_HOME/common/classes $CATALINA_HOME/common/endorsed/*.jar $CATALINA_HOME/common/lib/*.jar $CATALINA_BASE/shared/classes $CATALINA_BASE/shared/lib/*.jar"
takes precedence over all the others. The systems group here addedsome
of the
jakarta commons jars to the Bootstrap classloader, and now I cannot
Basically, your systems group should be shot ;) I'm just kidding of course, I don't want to advocate violence, but they're in the wrong, not you. Don't pollute the JDK installation by putting stuff in the lib/ext (the bootstrap classloader) unless ABSOLUTELY necessary, and it's very rare that you ABSOLUTELY need the jakarta commons jars there.
Is there something I am doing wrong? (Besides having jars in my
Bootstrap loader?)
What can I do to make sure that whatever I have in my /WEB-INF/lib/
directory takes
precedence?
You're not doing anything wrong, your systems group is. You can't override the bootstrap classloader.
Yoav Shapira
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
