code: protected Object findValue(String expr, Class<?> toType) {
      if (altSyntax() && toType == String.class) {
        return TextParseUtil.translateVariables('%', expr, stack);
      } else {
        expr = stripExpressionIfAltSyntax(expr);
        return stack.findValue(expr, toType, false);
      }
    }
docs: Evaluates the OGNL stack to find an Object of the given type. Will
  evaluate <code>expr</code> the portion wrapped with altSyntax (%{...})
  against stack when altSyntax is on, else the whole <code>expr</code> is
  evaluated against the stack.
  <p/>
  This method only supports the altSyntax. So this should be set to true.
  
  @param expr
  OGNL expression.
  @param toType
  the type expected to find.
  @return the Object found, or <tt>null</tt> if not found.