-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Craig,
Craig McClanahan wrote: > The naive way for a library to do this is: > > String className = ...; // Calculate the name of the class you want > Class clazz = Class.forName(className); > > * If commons-foo.jar is stored in a shared classloader provided by your > container, you'll get a ClassNotFoundException. That happens because > Class.forName() and friends start from the classloader that loaded the > calling class itself (i.e. the commons-foo class doing this work) ... but > your application class is not visible because you can only look *up* a > classloader hierarchy, not down. Can you briefly explain how struts even works when loaded from a shared ClassLoader? My reading of this suggests that shared struts would not be able to load actions found in the webapp's ClassLoader(s), but it sounds like the OP has done this successfully. I'm just curious how it is done because you say above that this is a naive implementation... how does one do this in a smart way? It's not too relevant to the question... just thought I'd take the opportunity to find out since I've never heard of a good way to search "down" the ClassLoader hierarchy. Thanks, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGJMBM9CaO5/Lv0PARAqcPAJ9vnk8pj9El1gWtmqPv2smLYkSyxgCbBjOx 1nEpmu62YlqqDaqjHYLEkN8= =HxZg -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]