protected Resolution doBindingAndValidation(final ExecutionContext ctx, final boolean doValidate) throws Exception {  final Configuration config = StripesFilter.getConfiguration(); ctx.setLifecycleStage(LifecycleStage.BindingAndValidation); ctx.setInterceptors(config.getInterceptors(LifecycleStage.BindingAndValidation));      PageContext pageContext = null; try { ActionBeanContext abc = ctx.getActionBeanContext(); pageContext = JspFactory.getDefaultFactory().getPageContext(this, abc.getRequest(), abc.getResponse(), null, true, abc.getResponse().getBufferSize(), true); DispatcherServlet.pageContextStash.set(pageContext); } catch (Exception e) {   }  try { return ctx.wrap( new Interceptor() { public Resolution intercept(ExecutionContext ctx) throws Exception { ActionBeanPropertyBinder binder = config.getActionBeanPropertyBinder(); binder.bind(ctx.getActionBean(), ctx.getActionBeanContext(), doValidate); return null; } }); } finally { if (pageContext != null) { DispatcherServlet.pageContextStash.set(null); JspFactory.getDefaultFactory().releasePageContext(pageContext); } }
protected Resolution doBindingAndValidation(ExecutionContext ctx) throws Exception { return DispatcherHelper.doBindingAndValidation(ctx, true);
    protected Resolution doBindingAndValidation(final ExecutionContext ctx,                                                final boolean doValidate) throws Exception {        // Bind the value to the bean - this includes performing field level validation        final Configuration config = StripesFilter.getConfiguration();        ctx.setLifecycleStage(LifecycleStage.BindingAndValidation);        ctx.setInterceptors(config.getInterceptors(LifecycleStage.BindingAndValidation));        // It's unclear whether this usage of the JspFactory will work in all containers. It looks        // like it should, but still, we should be careful not to screw up regular request        // processing if it should fail. Why do we do this?  So we can have a container-agnostic        // way of getting an ExpressionEvaluator to do expression based validation        PageContext pageContext = null;        try {            ActionBeanContext abc = ctx.getActionBeanContext();            pageContext = JspFactory.getDefaultFactory().getPageContext(this, // the servlet inst                                                                        abc.getRequest(), // req                                                                        abc.getResponse(), // res                                                                        null,   // error page url                                                                        true,   // need session                                                                        abc.getResponse().getBufferSize(),                                                                        true); // autoflush            DispatcherServlet.pageContextStash.set(pageContext);        }        catch (Exception e) {            // Don't even log this, this failure gets reported if action beans actually            // try and make use of expression validation, otherwise this is just noise        }        try {            return ctx.wrap( new Interceptor() {                public Resolution intercept(ExecutionContext ctx) throws Exception {                    ActionBeanPropertyBinder binder = config.getActionBeanPropertyBinder();                    binder.bind(ctx.getActionBean(), ctx.getActionBeanContext(), doValidate);                    return null;                }            });        }        finally {            if (pageContext != null) {                DispatcherServlet.pageContextStash.set(null);                JspFactory.getDefaultFactory().releasePageContext(pageContext);            }        }    }