logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Glezen <pgle...@atdial.net>
Subject Re: Websphere class problem with log4j
Date Sat, 14 Apr 2001 13:40:46 GMT
SCOTT FARQUHAR wrote:
> 
> Can anyone shed any light on why the jsp classloader has no problems, whilst the servlet
one does?
> 

Scott,

This is common enough situation that it probably deserves a FAQ entry. 
Remember that there are several different classloaders at work in
WebSphere.  The JSP processor is itself a servlet.  If, as a servlet, it
is in a different webapp than another servlet, the JSP process and the
other servlet will have two separate classloaders.

This in itself won't necessarily be a problem; unless log4j was loaded
by one of these two classloaders (in WebSphere, they would be sibling
classloaders - no parent/child relationship).  If you place log4j in the
application classpath you should be fine.  The application classloader
is a parent classloader of all webapp classloaders.  Just make sure you
don't define log4j extensions in your webapps.

For the straight dope on WebSphere classloading, check out the link
below.

http://www7.software.ibm.com/vadd-bin/ftpdl?1/vadc/wsdd/pdf/gisell/UnderstandingWebSphereClassLoaders.pdf

- Paul
-- 
Beware of bugs in the above code.  I have
only proved it correct, not tried it.
-Don Knuth

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


Mime
View raw message