Reloading Tiles2 Config in Spring 3.x

Posted on September 21, 2011
Tags: Spring

When you are using Tiles for layout composition with Spring you configure it as a view resolver by adding something like this to the applicationContext.xml

This will read the tiles.xml on startup. If you want it to refresh when the file changes you either need to add the Tiles filter, or more elegantly just add this context-param to the web.xml

Even better for testing environments, you can also put the declaration in your context.xml file, so you can switch it on and off on a per-deployment basis