public void setApplicationContext(ApplicationContext applicationContext) { if (resourceloader == null) { this.resourceloader = applicationContext; } cachingiss = new CachingInputStreamSource(resourceloader, cachesecs); if (basepath != BASEPATH_DEFAULT) { // make an initial attempt to load ALL producers, both for validation and // also to discover viewparameter types. String allpath = basepath + "*" + extension; Resource[] resources = null; try { resources = applicationContext.getResources(allpath); if (resources == null) resources = new Resource[0]; } catch (Exception e) { throw UniversalRuntimeException.accumulate(e, "Error getting resource list for pattern " + allpath); } for (int i = 0; i < resources.length; ++i) { String filename = resources[i].getFilename(); String viewid = FilenameUtil.getStem(filename); String fullpath = getFullPath(viewid); tryLoadProducer(fullpath, viewid); } } }