users@glassfish.java.net

Re: Custom Web-app Loader - How To?

From: <glassfish_at_javadesktop.org>
Date: Wed, 24 Oct 2007 16:30:29 PDT

Just by way of verification, I tried my application with and without "libraries" set to point to my docroot directory -- but with extra-class-path set in sun-web.xml in both cases.

My web app registers an MBean which has an operation exposing the Java equivalent of "which", i.e. calls getClass().getClassLoader().getResources(String) for a given resource name and returns the result as a String[]. [This is really a handy troubleshooting operation to expose in an MBean if you have complex classpaths and loads of jars, etc.]

At any rate both with and without specifying "libraries", a class known to exist in both docroot and WEB-INF/lib/*.jar was found first in the jar and last in the docroot in both cases. Using "libraries" didn't have any "insertion" effect.
[Message sent by forum member 'jess_holle' (jess_holle)]

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