Ok, the problem is my misunderstanding of the process here. I thought
WebAppClassLoader always checked WEB-INF/lib before delegating; I see that
it actually delegates to the System loader first, then checks WEB-INF/lib,
and finally delegates to its own parent. So my comment earlier about "they
can't both be right" was of course wrong - not only *can* they be both
right, they *are* :)

This explains the technical problem I've been chasing; I'll have it fixed
in a jiffy now. Thanks all.

--Pete

Konstantin Kolinko <knst.koli...@gmail.com> wrote on 06/17/2010 08:37:56
AM:

> 2010/6/16  <peter_f...@blm.gov>:
> >
> > Looking at section 10 of the 6.0 user guide, which describes
classloading,
> > the text makes perfect sense and matches the way I understand things
work.
> > However the summary at the end of the section "Class Loader
Definitions"
> > looks wrong; it basically says that the search order is...
> >
> > Bootstrap
> > $CLASSPATH
> > WEB-INF/classes
> > WEB-INF/lib/*.jar
> > $CATALINA_HOME/lib
> > $CATALINA_HOME/lib/*.jar
> >
> > ...when my understanding is it should be...
> >
> > WEB-INF/classes
> > WEB-INF/lib/*.jar
> > Bootstrap
> > $CLASSPATH
> > $CATALINA_HOME/lib
> > $CATALINA_HOME/lib/*.jar
> >
> > So, is the documentation just wrong, or have I misunderstood something?
> >
>
> The order is
> > Bootstrap
> > $CLASSPATH
> > WEB-INF/classes
> > WEB-INF/lib/*.jar
> > $CATALINA_BASE/lib
> > $CATALINA_BASE/lib/*.jar
> > $CATALINA_HOME/lib
> > $CATALINA_HOME/lib/*.jar
> as documented.
>
> Note, that many Bootstrap and $CLASSPATH classes are loaded at early
> stages of Tomcat startup sequence, that is before classloading
> hierarchy itself is created.   It would be a mess if those classes
> were ignored.
>
> That is why people should not play with $CLASSPATH, unless in certain
> very rare cases.
>
>
> If you have some documentation changes in your mind, the patches are
> welcome. The sources are in webapps/docs/*.xml  .  Create a Bugzilla
> issue and attach a diff file there (svn diff or an 'Unified diff'
> (diff -u)).
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to