Ok, sorry it took me awhile to get back to you. Looking at your struts-config.xml, one thing I notice is that all your <forward> elements inside your <action> elements are the same path, although you gave them different names. Why not just make a global "success" forward?
Next, the thing that bothers me is that I can't tell what your body and menu should be just by looking at the struts-config. Maybe it's a personal thing, but I like to be able to get an idea of the application flow just by looking at the struts-config. But, we can remedy that if you'd like by extending the ActionMapping class and adding attributes for "body" and "menu".
Now that we have this ActionMapping class, we can work it into our struts config.
Notice the className
attribute which specifies the name of your custom ActionMapping, as well as the <set-property> elements used to set your body and menu properties.
Now that we have those, let's make use of them in our Actions. We need something like this in our Actions:
This could get tedious putting this in every Action, so let's make use of the Template-Method Pattern
to extend Action and save us some typing. First we need a base action that will contain our template method.
Naturally you'll probably want to make those String literals constants, but you get the idea. Now that we have our base action, this is how we would do our specific Action classes:
How's that work out for you? You gain the reusability of your single template, plus you move your templates body and menu jsps into the struts config. Using the template method pattern, your custom base action will run the logic in your subclassed actions' run() method, extract your menu and body jsps from your custom ActionMapping and set them to the request for your tiles template.
What do you think?