    public int doStartTag() throws JspException {
        boolean beanNotPresent = getPageContext().findAttribute(binding) == null;
        try {
            final Configuration config = StripesFilter.getConfiguration();
            final ActionResolver resolver = StripesFilter.getConfiguration().getActionResolver();
            final HttpServletRequest request = (HttpServletRequest) getPageContext().getRequest();
            final HttpServletResponse response = (HttpServletResponse) getPageContext().getResponse();
            Resolution resolution = null;
            ExecutionContext ctx = new ExecutionContext();
            if (beanNotPresent) {
                ActionBeanContext tempContext =
                        config.getActionBeanContextFactory().getContextInstance(request, response);
                tempContext.setServletContext(getPageContext().getServletContext());
                ctx.setLifecycleStage(LifecycleStage.ActionBeanResolution);
                ctx.setActionBeanContext(tempContext);
                ctx.setInterceptors(config.getInterceptors(LifecycleStage.ActionBeanResolution));
                resolution = ctx.wrap( new Interceptor() {
                    public Resolution intercept(ExecutionContext ec) throws Exception {
                        ActionBean bean = resolver.getActionBean(ec.getActionBeanContext(), binding);
                        ec.setActionBean(bean);
                        return null;
                    }
                });
            }
            if (resolution == null && event != null && (beanNotPresent || this.alwaysExecuteEvent)) {
                ctx.setLifecycleStage(LifecycleStage.HandlerResolution);
                ctx.setInterceptors(config.getInterceptors(LifecycleStage.HandlerResolution));
                resolution = ctx.wrap( new Interceptor() {
                    public Resolution intercept(ExecutionContext ec) throws Exception {
                        ec.setHandler(resolver.getHandler(ec.getActionBean().getClass(), event));
                        ec.getActionBeanContext().setEventName(event);
                        return null;
                    }
                });
            }
            try {
                DispatcherHelper.setPageContext(getPageContext());
                if (resolution == null && (beanNotPresent || this.validate == true)) {
                    resolution = DispatcherHelper.doBindingAndValidation(ctx, this.validate);
                }
                if (resolution == null && this.validate == true) {
                    String temp =  config.getBootstrapPropertyResolver().getProperty(
                                        DispatcherServlet.RUN_CUSTOM_VALIDATION_WHEN_ERRORS);
                    boolean validateWhenErrors = temp != null && Boolean.valueOf(temp);
                    resolution = DispatcherHelper.doCustomValidation(ctx, validateWhenErrors);
                }
            }
            finally {
                DispatcherHelper.setPageContext(null);
            }
            if (resolution == null && this.validate == true) {
                resolution = DispatcherHelper.handleValidationErrors(ctx);
            }
            if (resolution == null && event != null && (beanNotPresent || this.alwaysExecuteEvent)) {
                resolution = DispatcherHelper.invokeEventHandler(ctx);
            }
            DispatcherHelper.fillInValidationErrors(ctx);  
            if (resolution != null && this.executeResolution) {
                DispatcherHelper.executeResolution(ctx, resolution);
            }
            if (getVar() != null) {
                pageContext.setAttribute(getVar(), ctx.getActionBean());
            }
            return SKIP_BODY;
        }
        catch(Exception e) {
            throw new StripesJspException("Unabled to prepare ActionBean for JSP Usage",e);
        }
    }

    public int doStartTag() throws JspException {
        ActionBean actionBean = (ActionBean) getPageContext().findAttribute(binding);
        boolean beanNotPresent = actionBean == null;
        try {
            final Configuration config = StripesFilter.getConfiguration();
            final ActionResolver resolver = StripesFilter.getConfiguration().getActionResolver();
            final HttpServletRequest request = (HttpServletRequest) getPageContext().getRequest();
            final HttpServletResponse response = (HttpServletResponse) getPageContext().getResponse();
            Resolution resolution = null;
            ExecutionContext ctx = new ExecutionContext();
            if (beanNotPresent) {
                ActionBeanContext tempContext =
                        config.getActionBeanContextFactory().getContextInstance(request, response);
                tempContext.setServletContext(getPageContext().getServletContext());
                ctx.setLifecycleStage(LifecycleStage.ActionBeanResolution);
                ctx.setActionBeanContext(tempContext);
                ctx.setInterceptors(config.getInterceptors(LifecycleStage.ActionBeanResolution));
                resolution = ctx.wrap( new Interceptor() {
                    public Resolution intercept(ExecutionContext ec) throws Exception {
                        ActionBean bean = resolver.getActionBean(ec.getActionBeanContext(), binding);
                        ec.setActionBean(bean);
                        return null;
                    }
                });
            }
            else {
                ctx.setActionBean(actionBean);
                ctx.setActionBeanContext(actionBean.getContext());
            }
            if (resolution == null && event != null && (beanNotPresent || this.alwaysExecuteEvent)) {
                ctx.setLifecycleStage(LifecycleStage.HandlerResolution);
                ctx.setInterceptors(config.getInterceptors(LifecycleStage.HandlerResolution));
                resolution = ctx.wrap( new Interceptor() {
                    public Resolution intercept(ExecutionContext ec) throws Exception {
                        ec.setHandler(resolver.getHandler(ec.getActionBean().getClass(), event));
                        ec.getActionBeanContext().setEventName(event);
                        return null;
                    }
                });
            }
            try {
                DispatcherHelper.setPageContext(getPageContext());
                if (resolution == null && (beanNotPresent || this.validate == true)) {
                    resolution = DispatcherHelper.doBindingAndValidation(ctx, this.validate);
                }
                if (resolution == null && this.validate == true) {
                    String temp =  config.getBootstrapPropertyResolver().getProperty(
                                        DispatcherServlet.RUN_CUSTOM_VALIDATION_WHEN_ERRORS);
                    boolean validateWhenErrors = temp != null && Boolean.valueOf(temp);
                    resolution = DispatcherHelper.doCustomValidation(ctx, validateWhenErrors);
                }
            }
            finally {
                DispatcherHelper.setPageContext(null);
            }
            if (resolution == null && this.validate == true) {
                resolution = DispatcherHelper.handleValidationErrors(ctx);
            }
            if (resolution == null && event != null && (beanNotPresent || this.alwaysExecuteEvent)) {
                resolution = DispatcherHelper.invokeEventHandler(ctx);
            }
            DispatcherHelper.fillInValidationErrors(ctx);  
            if (resolution != null && this.executeResolution) {
                DispatcherHelper.executeResolution(ctx, resolution);
            }
            if (getVar() != null) {
                pageContext.setAttribute(getVar(), ctx.getActionBean());
            }
            return SKIP_BODY;
        }
        catch(Exception e) {
            throw new StripesJspException("Unabled to prepare ActionBean for JSP Usage",e);
        }
    }
