web.xml
Loom requires a filter to handle action requests:
Spring
The simplest way to create a working configuration file is using the XML namespace.
This example will search for actions inside com.acme.action and org.loom.action.support. Any class inside these packages that is not abstract and implements the Action interface will be registered automatically.
The example also includes a web resource bundle configured to serve some css and js files.
The ResourcesWatchdog instance configured here will observe modification of files: any modification to messages.properties or any css/js file will be detected at runtime without restarting the server.
When config.development is set to false all javascript and css files will be concatenated and minified before being delivered to the browser.
Guice
Starting with 2.3, Loom can also be used with Google Guice. The framework comes with several modules to make configuration easier. The following is an example using AppEngine (requires loom-appengine.jar):