/** {@inheritDoc} */ public URL getResource(String path) throws IOException { URL rootUrl = rootContext.getResource(path); if (rootUrl == null) { Set<URL> resources = getResources(path); resources.remove(null); if (resources.size() > 0) { rootUrl = resources.toArray(new URL[resources.size()])[0]; } } return rootUrl; }
/** * Returns a list containing the URLs to be parsed. By default, it returns a * list containing the URL point to "/WEB-INF/tiles.xml". * @param applicationContext The Tiles application context. * @param contextFactory The Tiles context factory. * * @return The source URLs. * @since 2.1.1 */ protected List<URL> getSourceURLs(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory) { List<URL> retValue = new ArrayList<URL>(1); try { retValue.add(applicationContext.getResource("/WEB-INF/tiles.xml")); } catch (IOException e) { throw new TilesContainerFactoryException( "Cannot get URL: /WEB-INF/tiles.xml", e); } return retValue; }