I tried modifying the doEndTag method in UseContextTag.java, and found
that the o Object is null.

public int doEndTag() throws JspException {
    Object o = pageContext.getAttribute(getId(), scope);
    if (o != null) {
        if (!getClassOfExportedObject().isInstance(o)) {
            o = null;
        }
    }
    if (o != null) {
        pullInSupplimentalAttributes();
        o = getObjectToExport();
    }
    // nasty debug method..
    System.out.println("o is: " + o + ", id is: " + getId() + ", scope
is: " + scope);

    pageContext.setAttribute(getId(), o, scope);
    return EVAL_PAGE;
}

This outputs; 

o is: null, id is: test, scope is: 3


There is a note in the (scarce) documentation for this taglib that says
that "as of right now this does not look into the id and the scope to
see if the context already exists, so it does not behave entire like
useBean". Maybe this might be related to this problem.

Is the developer of this taglib online here?



-- 
- Torgeir

Reply via email to