tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Weird Classloader Scenario - Is This Possible?
Date Wed, 02 Jun 2004 18:37:28 GMT

Hi,
You can try Thread.currentThread().getContextClassLoader() instead of
handler.getClass().getClassLoader().

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Matthew.Hanson@micorp.com [mailto:Matthew.Hanson@micorp.com]
>Sent: Wednesday, June 02, 2004 2:37 PM
>To: tomcat-user@jakarta.apache.org
>Subject: Weird Classloader Scenario - Is This Possible?
>
>Hi,
>
>We have a fairly generic servlet framework that is used across more
than
>one web app deployed to tomcat 4.1.30 on win2k using java 1.4.2_03-b02.
>The framework was initially included in the WEB-INF/lib for each
>application.  However, I was hoping the framework jar could reside in
>shared/lib.  This framework code basically uses a request handler to
pass
>incoming requests to a webapp-specific request processor.  The request
>handler instantiates a request processor via
>handler.getClass().getClassLoader().loadClass(SOME_PROCESSOR).newInstan
ce()
>.
> Basically, as expected, the classloader fails to load the request
>processor class with the framework jar now in shared/lib.
>
>Is there a loader scheme that I can use in the shared/lib jar that can
be
>used to instantiate classes from my webapp (WEB-INF/classes)?
>
>Thanks!
>Matt Hanson



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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message