final PageContext context = DispatcherServlet.getPageContext();
final PageContext context = DispatcherHelper.getPageContext();
    protected void doExpressionValidation(ActionBean bean,                                          ParameterName name,                                          List<Object> values,                                          Validate validationInfo,                                          ValidationErrors errors) {        // If a validation expression was supplied, see if we can process it!        Expression expr = null;        DelegatingVariableResolver resolver = null;        if ( !"".equals(validationInfo.expression()) ) {            final PageContext context = DispatcherServlet.getPageContext();            if (context == null) {                log.error("Could not process expression based validation. It would seem that ",                          "your servlet container is being mean and will not let the dispatcher ",                          "servlet manufacture a PageContext object through the JSPFactory. The ",                          "result of this is that expression validation will be disabled. Sorry.");            }            else {                try {                    // If this turns out to be slow we could probably cache the parsed expression                    String expression = validationInfo.expression();                    if (!expression.startsWith("${")) {                        expression = "${" + expression + "}";                    }                    ExpressionEvaluator evaluator = context.getExpressionEvaluator();                    expr = evaluator.parseExpression(expression, Boolean.class, null);                    resolver = new DelegatingVariableResolver(bean, context.getVariableResolver());                }                catch (ELException ele) {                    throw new StripesRuntimeException("Could not parse the EL expression being " +                            "used to validate field " + name.getName() + ". This is " +                            "not a transient error. Please double check the following expression " +                            "for errors: " + validationInfo.expression(), ele);                }            }        }        for (Object value : values) {            // And then if we have an expression to use            if (expr != null) {                try {                    resolver.setCurrentValue(value);                    Boolean result = (Boolean) expr.evaluate(resolver);                    if (!Boolean.TRUE.equals(result)) {                        ValidationError error = new ScopedLocalizableError("validation.expression",                                                                           "valueFailedExpression");                        error.setFieldValue(String.valueOf(value));                        errors.add(name.getName(), error);                    }                }                catch (ELException ele) {                    log.error("Error evaluating expression for property ", name.getName(),                              " of class ", bean.getClass().getSimpleName(), ". Expression: ",                              validationInfo.expression());                }            }        }    }