Hi,
I inherited a
struts 1.3.10 app., and I'm trying to streamline all the classes with DispatchAction.
The current app has a class structure that looks like this:
appplicationClassXYZ (there are a lot of these) --> rootAction --> Action
rootAction is where admin duties are handled (in the
execute() method) -- logging, checking that user is logged in, other junk ( filters may be best for some of this). To put all of these classes into one class, I notice from the Struts docs that I need to extend
DispatchAction, but I
don't override the
execute() method or even deal with it in the subclass. So, the question is how can I handle admin duties such that every time superclass is called, the admin stuff, logging, etc. is taken care of? That is, don't I need to extend the
execute() method? or do I put the admin stuff in a separate method in
rootAction and be sure to call it for every method when I extend the
DispatchAction? Seems like I should be able to encapsulate this.
this should be simple, but I'm not getting it. Just not sure how exactly DispatchAction works.
_Rex