You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by arvind ramaswami <ar...@yahoo.com> on 2003/06/09 22:08:13 UTC
Nested tag Exception when using nested:define
We are not using Struts fraemwork as such but
something very close to it. (No Action Forms, but a
map file similar to Struts-config)
Environment is Tomcat 4.1.12, with
nested-tags.jar(compiled classes as of 04/08/2002)
and struts.jar (1.1 RC).
I am wondering if I am using an old version of the
nested-tags jar file. If so, is there a newer version
that works with Struts1.1 jar ?
I am giving you the code below. It blows up as soon as
it hits the first <nested:define> tag.
I hope the code is ok .
In the calling page which starts the recusrion :
<c:choose>
<c:when
test="${!documentList.treeNode.hasChildren}">
There are no documents.
</div>
</c:when>
<c:otherwise>
<nested:root name="documentList">
<nested:nest property="treeNode">
<jsp:include page="docnode.jsp" />
</nested:nest>
</nested:root>
</c:otherwise>
</c:choose>
Here's the resursive docnode.jsp (the main part that
breaks) :
<nested:root>
<nested:equal property="showChildren"
value="true">
<nested:define id="imgState"
value="open18x16.gif" />
</nested:equal>
<!--html for the prent row-->
<nested:equal property="hasChildren" value="true">
<nested:iterate property="childCollection">
<jsp:include page="docnode.jsp" />
</nested:iterate>
</nested:equal>
</nested:root>
The following exception is thrown :
java.lang.NullPointerException
at
org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(NestedPropertyHelper.java:173)
at
org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(NestedPropertyHelper.java:195)
at
org.apache.struts.taglib.nested.NestedPropertyHelper.setNestedProperties(NestedPropertyHelper.java:242)
at
org.apache.struts.taglib.nested.bean.NestedDefineTag.doStartTag(NestedDefineTag.java:89)
at
org.apache.jsp.docnode_jsp._jspService(docnode_jsp.java:119)
your help is appreciated
thanks
arvind
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org