I was talking about a "dynamic" mecanism. In Struts 1, I never called 
super.dispathMethod() : the CRMAction.dispatchMethod() was first called by 
Struts, then my "return super.dispatchMethod()" was returning the 
ActionForward returned by my called Action.

public class CRMAction extends DispatchAction {
        protected ActionForward dispatchMethod(ActionMapping mapping, 
ActionForm form, HttpServletRequest request, HttpServletResponse response, 
String name) throws Exception {
                try{
                        log.debug("CRM dispatchMethod.debut");
                        UserBean user = getConnectedUser(request);
                        if(user==null) {
                                log.error("User null !");
                                return mapping.findForward("error");
                        }
                        return super.dispatchMethod(mapping, form, 
request, response, name);
                } catch (Exception e) {
                        log.error(e.getMessage());
                        return mapping.findForward("error");
                }
        }

Regards,

Michaƫl




--- [EMAIL PROTECTED] wrote:
> My parent Action : 
> public class CRMAction extends ActionSupport
>         @Override
>         public String execute() throws Exception {
>                 //do all tests (user logged, ...)
>                 //...
>                 return super.execute();
>         }
> }
> 
> My others Actions :
> public class LoginAction extends CRMAction {
>         public String myMethod () {
>                 //do something
>                 return "myForward";
>         }
> }
> 
> But I never go in CRMAction.execute()...

You never call super.execute() in your subclass.

d.



Reply via email to