* @return The created container
*/
protected TilesContainer createContainer(ServletContext context) {
TilesApplicationContext applicationContext = new ServletTilesApplicationContext(
context);
AbstractTilesApplicationContextFactory acFactory = AbstractTilesApplicationContextFactory
.createFactory(applicationContext);
if (acFactory instanceof Initializable) {
((Initializable) acFactory).init(applicationContext.getInitParams());
}
applicationContext = acFactory.createApplicationContext(context);
AbstractTilesContainerFactory factory = AbstractTilesContainerFactory
.getTilesContainerFactory(applicationContext);
return factory.createContainer(applicationContext);
}