JarFile[] jars = jarRepository.findJars();
for (int i = 0; i < jars.length; i++) {
if (jars[i].getEntry(Globals.OVERLAY_PATH) != null) {
if (context.getResources() instanceof ProxyDirContext) {
ProxyDirContext resources = (ProxyDirContext) context.getResources();
JARDirContext overlay = new JARDirContext();
overlay.setJarFile(jars[i], Globals.OVERLAY_PATH);
resources.addOverlay(overlay);
} else {
// Error, overlays need a ProxyDirContext to compose results
log.error(sm.getString("contextConfig.noOverlay", jars[i].getName()));
ok = false;