DirContext oldResources = this.webappResources;
if (oldResources == resources)
return;
if (resources instanceof BaseDirContext) {
BaseDirContext baseDirContext = (BaseDirContext)resources;
baseDirContext.setCached(isCachingAllowed());
baseDirContext.setCacheTTL(getCacheTTL());
baseDirContext.setCacheMaxSize(getCacheMaxSize());
}
if (resources instanceof FileDirContext) {
filesystemBased = true;
FileDirContext fileDirContext = (FileDirContext)resources;
fileDirContext.setCaseSensitive(isCaseSensitive());