How to pass current object in custom tag. Tried by using var="workobj" in iterator, and by passing "workobj" in custom tag as shown below.But it returns null.
<s:iterator value="#request.work" var="workobj">
<s:property> <!-- Returns current object -->
<!-- Custom tag start--->
<work:validate work="${workobj}" >
</work:validate>
<!-- Custom tag end--->
</s:iterator>
The
iteratortag pushes the current element ontopof the value stack. The Struts request wrapper has access to thevalueStacksearching the attributes with the keys from JSP EL expression.