users@glassfish.java.net

Re: Custom Web-app Loader - How To?

From: <glassfish_at_javadesktop.org>
Date: Thu, 25 Oct 2007 08:41:10 PDT

I don't care about the load order of jars with respect to one another. I do need the docroot directory itself (not jars therein) in the load order prior to the WEB-INF stuff, though.

The load order is fortunately not required in most cases -- we get by with the docroot at the end of the load order to a fair degree. This breaks down when a resource appears both in a jar and in the docroot, however -- which is done in cases where the default resource appears in both locations, but the docroot one is intended to be updatable and to override that in the jars.

As far as client libraries, no, the same jars are not used in the web-app (except for some 3rd-party jar cases in which case we duplicate jars betweeen docroot lib and WEB-INF/lib). The client libraries are mostly built from resources in docroot based on HTTP access logs produced when applets are run. This yields client jars containing what clients use at runtime but failover to "loose" classes, etc, in docroot is still required for cases that are missed. The big issue is really that duplicating all the resources that a client might use from docroot into WEB-INF/classes is prohibitive -- the resources therein need to be shared between the tiers. We used to replace WEB-INF/classes with a symbolic link to the docroot, but this threw some servlet engines into an infinite traversal loop and didn't work on UNIX [yes, I know there are symlink like things on Windows now, but they're still not really first class things].
[Message sent by forum member 'jess_holle' (jess_holle)]

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