When I want to apply the DRY principle, i.e. to unify the code of multiple Struts action for different use-cases (for example the administrator role and the operator role ), one option would be to use an abstract base class “BaseAction” for the action and then use “AdminAction extends BaseAction” and “OperatorAction extends BaseAction”. I would apply inheritance for an abstract NewBaseAction, UpdateBaseAction, DeleteBaseAction, ListBaseAction.
But there is a principle that says “favor composition over inheritance” (http://www.artima.com/lejava/articles/designprinciples4.html). Is there a way to implement this in a clean way by using interfaces?
Statement “favor composition over inheritance” it’s a clue for better design in general. Frameworks like Struts introduce own programming model. So you should write Struts action in a way that they adhere to Struts best practices.
In your case writing base class isn’t bad. The question is how to design action class hierarchy, e.g. consider using DispatchAction for part of your functionality as your base action class. It will save you from creating a lot unnecessary classes.
Find “Struts way” use cases of DRY principle. More Struts best practises you’ll find in free book Struts Survival Guide