try {
if ((docBase != null) && (docBase.endsWith(".war")) &&
(!(new File(docBase).isDirectory())))
setResources(new WARDirContext());
else
setResources(new FileDirContext());
} catch (IllegalArgumentException e) {
log.error(sm.getString("standardContext.resourcesInit"), e);
ok = false;
}
}
if (ok) {
if (!resourcesStart()) {
ok = false;
}
}
// Add alternate resources
if (alternateDocBases != null && alternateDocBases.size() > 0) {
for (int i=0; i<alternateDocBases.size(); i++) {
AlternateDocBase alternateDocBase = alternateDocBases.get(i);
String docBase = alternateDocBase.getDocBase();
if (log.isDebugEnabled()) {
log.debug("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) {
log.error(sm.getString("standardContext.resourcesInit"),
e);
ok = false;