try {
if ((docBase != null) && (docBase.endsWith(".war")) &&
(!(new File(docBase).isDirectory())))
setResources(new WARDirContext());
else
setResources(new FileDirContext());
} catch (IllegalArgumentException e) {
throw new LifecycleException(rb.getString(INIT_RESOURCES_EXCEPTION), e);
}
}
resourcesStart();
// Add alternate resources
if (alternateDocBases != null && !alternateDocBases.isEmpty()) {
for(AlternateDocBase alternateDocBase : alternateDocBases) {
String docBase = alternateDocBase.getDocBase();
if(log.isLoggable(Level.FINE)) {
log.log(Level.FINE, "Configuring alternate resources");
}
try {
if(docBase != null && docBase.endsWith(".war") &&
(!(new File(docBase).isDirectory()))) {
setAlternateResources(alternateDocBase,
new WARDirContext());
} else {
setAlternateResources(alternateDocBase,
new FileDirContext());
}
} catch(IllegalArgumentException e) {
throw new LifecycleException(rb.getString(INIT_RESOURCES_EXCEPTION), e);
}
}