After much righteous struggle, my programming pair figured out how to make a reuseable tile for Sruts, testing and all. The pieces are five:
- An actual tile (JSP file) and matching entry in the tiles definition file; this is fully reuseable
- A controller and display adapter to populate the tile, and tests for the controller; use an abstract base controller and test for the tile and specialize for each specific use
- An action and form to read the tile back, and tests for the action; use an abstract base action and test for the tile and specialize for each specific use
- Glue in the struts configuration file to hold it all together
- And methods in the service layer as data sources and sinks for the controller and action and tests
And all my tests are green.