tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter_F...@blm.gov
Subject Re: Tomcat 6.0 documentation: is classloading description correct?
Date Thu, 17 Jun 2010 18:50:50 GMT
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.kolinko@gmail.com> wrote on 06/17/2010 08:37:56
AM:

> 2010/6/16  <Peter_Ford@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


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


Mime
View raw message