struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Van Wart <>
Subject Re: about overriding the excute method
Date Wed, 23 Aug 2006 21:22:06 GMT
Gomathi wrote:
> hai,
>   what will happen when the execute () of action class is overrided by the subclass called
dispatch action?.
> Regards 
> gomes
If you mean extending DispatchAction, your execute() method will get 
called.  Unless you have a call to super.execute() (which then calls 
DispatchAction.execute()), your class will pretty much behave like a 
regular Action class, which kind of defeats the purpose of extending 
DispatchAction in the first place.

If you need to do special processing before any of your methods are 
invoked, an idea is to override execute(), do some processing and ensure 
you call super.execute() somewhere appropriate.

- Scott

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message