You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paula Coll <pc...@hotmail.com> on 2003/07/01 12:36:38 UTC

Newbie question: DispatchAction subclassing

Hi, I am currently developing a webapp with Struts 1.1 and I have decided to
use the DispatchAction to group functionality, instead of having a large
bunch of single Action classes.
Now I face the following problem: I want to have some pre-processing generic
code invoked for every action, but I'd rather have it in, say, a
GenericDispatchAction than duplicate it in the subclasses.
As I see, each of my subclasses would have its methodName executed against
requests (instead of the traditional execute() method of the Action class).
Where should I put this generic invocations (for example, for session, login
checking, exception handling, authorization, etc.)?
Could I override the DispatchAction execute() method in my
"GenericDispatchAction" for example to do exception handling? Could I do
common processing in the dispatchMethod() method instead?
Please help!




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org