On Tue, 2011-09-06 at 21:21 +0200, Antonio Petrelli wrote: > 2. Create your own initializer and TilesContainerFactory, extending > BasicTilesContainerFactory.getSourceURLs.
This is the way i did it.
With the following code in your container factory:
@Override
protected List<URL> getSourceURLs(
final ApplicationContext applicationContext) {
try {
final Set<URL> finalSet = new HashSet<URL>();
final Set<URL> webINFSet =
applicationContext.getResources("/WEB-INF/**/tiles*.xml");
final Set<URL> metaINFSet =
applicationContext.getResources("classpath*:META-INF/**/tiles*.xml");
if (webINFSet != null) {
finalSet.addAll(webINFSet);
}
if (metaINFSet != null) {
finalSet.addAll(metaINFSet);
}
return URLUtil.getBaseTilesDefinitionURLs(finalSet);
} catch (IOException e) {
throw new DefinitionsFactoryException("Cannot load definition
URLs", e);
}
}
we load all tiles*.xml from WEB-INF and META-INF locations.
~mck
signature.asc
Description: This is a digitally signed message part
