You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by Heath Chiavettone <HC...@ariba.com> on 2002/10/19 04:55:26 UTC

JSTL bug or feature?

I'm working with JSTL and my program is throwing exceptions when the
Evaluator.evaluate() method is being called.  I'm including a partial stack
trace.  What I'm curious about is the fact that in the source, in the
exception handler, the JspException that is being thrown does not store the
RootCause exception in it when created.  I've written an exception handler
that attempts to drill down through all of the "root cause" exceptions to
help us evaluate what problems we have.  Unfortunately, the JSTL doesn't
give me the means of figuring out what "really" when wrong.

 

Is this a bug in JSTL or a new feature request?

 

Partial Exception stack:

 

javax.servlet.jsp.JspException: An error occurred while evaluating custom
action

 attribute "value" with value "${participant.totalCostOfBid}": An error
occurred

 while getting property "totalCostOfBid" from an instance of class <our
class>

        at
org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.ja

va:140)

        at
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.e

valuate(ExpressionEvaluatorManager.java:112)

        at
org.apache.taglibs.standard.tag.el.core.ExpressionUtil.evalNotNull(Ex

pressionUtil.java:85)

        at
org.apache.taglibs.standard.tag.el.core.OutTag.evaluateExpressions(Ou

tTag.java:137)

        at
org.apache.taglibs.standard.tag.el.core.OutTag.doStartTag(OutTag.java

:95)

 

Source:

  //-------------------------------------

  /**

   *

   * Evaluates the expression at request time

   **/

  public Object evaluate (String pAttributeName,

                                      String pAttributeValue,

                                      Class pExpectedType,

                                      Tag pTag,

                                      PageContext pPageContext,

                                      Map functions,

                                      String defaultPrefix)

    throws JspException

  {

    try {

      return sEvaluator.evaluate

            (pAttributeValue,

             pPageContext,

             pExpectedType,

             functions,

             defaultPrefix);

    }

    catch (ELException exc) {

      throw new JspException

            (MessageFormat.format

             (Constants.ATTRIBUTE_EVALUATION_EXCEPTION,

              new Object [] {

                "" + pAttributeName,

                "" + pAttributeValue,

                exc.getMessage ()

              }));

    }

  }