users@glassfish.java.net

Re: Custom Web-app Loader - How To?

From: <glassfish_at_javadesktop.org>
Date: Thu, 25 Oct 2007 05:59:12 PDT

First off, the docs make it sounds like paths are relative to your docroot, which is why I tried ".". Paths [i]are[/i] docroot relative in <sun-web-app>/<class-loader>'s extra-class-path attribute.

Second, it's clear libraries won't work here for a couple of reasons. I need to add the docroot directory itself as a classloader entry, not a jar. I need this to be added to the web app classloader, not a parent thereof. The classes in docroot reference classes in WEB-INF/lib/*.jar (and vice versa) -- they have to be loaded by the same classloader.

Why libraries should allow jars and not directories is beyond me -- I would have still expected it to add my "codebase" directory to the classloader when I gave the full path. In the end, however, this is irrelevant since the libraries feature inserts a separate classloader rather than a classloader entry.
[Message sent by forum member 'jess_holle' (jess_holle)]

http://forums.java.net/jive/thread.jspa?messageID=242097