2009/4/1 Amin Mohammed-Coleman <[email protected]>: > java.lang.IllegalArgumentException: Cannot find a factory to create > the request context
This is because you've not configured a Tiles request context factory for FreeMarker. > Looking at the test tiles from svn I can see a testtileslistener which > extends tileslistener. I need to configure a listener in my web.xml > however the test contains quite a number of other classes which I > don't know if I need. Is there a extended tileslistener that I can > use? You have two choices: 1) using parameter-based initialization, by setting this parameter: http://tiles.apache.org/framework/config-reference.html#org.apache.tiles.context.ChainedTilesRequestContextFactory.FACTORY_CLASS_NAMES 2) Using pure Java configuration: http://tiles.apache.org/framework/tutorial/configuration.html#Startup_with_Java_code http://tiles.apache.org/framework/tutorial/configuration.html#Pure_Java_configuration In particular you have to override this method of BasicTilesContainerFactory: http://tiles.apache.org/framework/apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#registerChainedRequestContextFactories(org.apache.tiles.context.ChainedTilesRequestContextFactory) HTH Antonio
