Summary: | nullPointerExcpetion when using getColumn | ||
---|---|---|---|
Product: | Taglibs | Reporter: | Wim Bervoets <wb> |
Component: | DBTags Taglib | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | CLOSED WONTFIX | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 1.0B1 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All |
Description
Wim Bervoets
2001-12-04 02:28:55 UTC
After talking to Resin developers we've found out it is a bug in DBTags. The BaseGetterTag.doEndTag() violates the spec by setting _name to null. Tags may not change attribute values until release it called. More information at http://www.caucho.com/quercus/bugtrack/view.xtp? bugreport_id=135 A proposed fix is: In BaseGetterTag.doEndTag() : /** * If I understand the new JSP spec correctly, release() * is NOT called between invocations of a cached taglib, * so I guess we do it manually or write a new method. * * @return EVAL_PAGE constant */ public int doEndTag() { return EVAL_PAGE; } (I removed the call to release() ) Resin 2.0.x and DBTags now work okay :-) Wim Bervoets The JSP 1.1 spec was sadly vague with regard to certain aspect of the taglib lifecycle. If I understand the JSP 1.2 spec correctly, release() is only guaranteed to be called upon garbage collection of a tag, which is not necessarily with every invocation. Therefore, tags must reset their state manually. My guess is that this version of Resin does not call the getter methods on a tag while inside a loop (either when faced with a constant, or always). Is this the case? If so, it sounds like an optimization that does not agree with the lifecycle clarifications in the JSP 1.2 spec. |