Overview
The NanoWar Struts integration kit allows you to write Struts actions that are PicoContainer components. In other words, they can benefit from Dependency Injection.
Example
Struts actions often integrate with business logic and/or persistence logic. In a non-Dependency Injection environment, the actions tend to be tightly coupled to the business logic and persistence layer tiers, and therefore hard to test in isolation.
NanoWar Struts lets you use DependencyInjection.
The particularly nice thing about this is that it allows you to test the Action in isolation (by passing in a mock CheeseDao). And when you deploy the Struts application, you can have NanoContainer provide the real CheeseDao (that possibly does some fancy Hibernate stuff or other).
Struts Specific Configuration
Use the PicoRequestProcessor instead of the standard Struts one. In struts-config:xml:
If you use the Tiles library, use PicoTilesRequestProcessor instead.
In addition to this, you must also follow the instuctions for NanoWar.
