You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Darren Hill <dh...@724.com> on 2002/09/23 19:51:38 UTC

Extending Action and DispatchAction

Hi All,

If I've got common code that happens in ALL actions and I extend BOTH Action
and DispatchAction .. how can I include the common methods for both actions,
rather the copying that code in each?

Darren.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Extending Action and DispatchAction

Posted by John Owen <jo...@hotmail.com>.
Create a base class that includes the method/common code and have that class
extend DispatchAction (and Action if you really need to). Then have all your
action classes extend that base class.
----- Original Message -----
From: "Darren Hill" <dh...@724.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Monday, September 23, 2002 12:51 PM
Subject: Extending Action and DispatchAction


> Hi All,
>
> If I've got common code that happens in ALL actions and I extend BOTH
Action
> and DispatchAction .. how can I include the common methods for both
actions,
> rather the copying that code in each?
>
> Darren.
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>