Package javax.servlet.jsp.el

Examples of javax.servlet.jsp.el.ExpressionEvaluator.evaluate()


        String string = super.getValue();

        ExpressionEvaluator eval = pageContext.getExpressionEvaluator();

        try {
            Object evaluated = eval.evaluate(
                    string,
                    Object.class,
                    pageContext.getVariableResolver(),
                    null
            );
View Full Code Here


        String string = super.getValue();

        ExpressionEvaluator eval = pageContext.getExpressionEvaluator();

        try {
            Object evaluated = eval.evaluate(
                    string,
                    Object.class,
                    pageContext.getVariableResolver(),
                    null
            );
View Full Code Here

    private static final Object evaluate(String expression, Class expectedType, Object actionForm, HttpServletRequest request, ServletContext servletContext)
        throws ELException
    {
        // todo: can this be static / final?
        ExpressionEvaluator ee = getExpressionEvaluator();
        return ee.evaluate(expression, expectedType, getVariableResolver(actionForm, request, servletContext), null);
    }

    private static final ExpressionEvaluator getExpressionEvaluator()
    {
        return new ExpressionEvaluatorImpl();
View Full Code Here

  public void handle(String data, ContentHandler handler) {
    ExpressionEvaluator evaluator = new ExpressionEvaluatorImpl();
    Object value;

    try {
      value = evaluator.evaluate(data, Object.class, resolver, mapper);

      if (value != null) {
        char[] result = value.toString().toCharArray();
        handler.characters(result, 0, result.length);
      } else {
View Full Code Here

    private static final Object evaluate(String expression, Class expectedType, Object actionForm, HttpServletRequest request, ServletContext servletContext)
        throws ELException
    {
        // todo: can this be static / final?
        ExpressionEvaluator ee = getExpressionEvaluator();
        return ee.evaluate(expression, expectedType, getVariableResolver(actionForm, request, servletContext), null);
    }

    private static final ExpressionEvaluator getExpressionEvaluator()
    {
        return new ExpressionEvaluatorImpl();
View Full Code Here

     */
    private Object convertToExpectedType( final Object value,
    Class expectedType )
    throws javax.servlet.jsp.el.ELException {
        ExpressionEvaluator evaluator = pageContext.getExpressionEvaluator();
        return evaluator.evaluate( "${result}", expectedType,
        new VariableResolver() {
            public Object resolveVariable( String pName )
            throws ELException {
                return value;
            }
View Full Code Here

            if ((uriText.getText().length() == 0) && !editingDefault) {
                throw ValidationException.required(uriText, "Please enter a URL.");
            }
            ExpressionEvaluator eval = new ExpressionEvaluatorImpl();
            try {
                eval.evaluate((String) nameText.getText(), String.class, new DefaultVariables(),
                              StaticFunctionMapper.getDefault());
            } catch (Exception e) {
                throw ValidationException.invalid(nameText, "Error evaluating EL expression:\n" + e.getMessage());
            }
            try {
View Full Code Here

                              StaticFunctionMapper.getDefault());
            } catch (Exception e) {
                throw ValidationException.invalid(nameText, "Error evaluating EL expression:\n" + e.getMessage());
            }
            try {
                eval.evaluate((String) uriText.getText(), String.class, new DefaultVariables(),
                              StaticFunctionMapper.getDefault());
            } catch (Exception e) {
                throw ValidationException.invalid(uriText, "Error evaluating EL expression:\n" + e.getMessage());
            }
View Full Code Here

    public void actionPerformed(ActionEvent ev) {
      try {
        StaticFunctionMapper functionMapper = StaticFunctionMapper.getDefault();
        ExpressionEvaluator eval = new ExpressionEvaluatorImpl();
        VariableResolver resolver = new DefaultVariables(uriText.getText(), null, null);
        resultText.setText((String) eval.evaluate(elText.getText(), String.class, resolver, functionMapper));
      } catch (ELException e) {
        ExceptionDialog.show(TestingTool.this, e);
      }
    }
  }
View Full Code Here

    public String evaluate(String value, PageContext pageContext) throws JspException {
        ExpressionEvaluator eval = pageContext.getExpressionEvaluator();

        try {
            Object evaluated = eval.evaluate(
                    value,
                    Object.class,
                    pageContext.getVariableResolver(),
                    null
            );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.