I'm having a problem with the
struts html:link tag which I can't unravel using the available documentation. My code snippet follow this explanation.
I have a bean named �photo� (an object of class �Photo�) in my
jsp which is generated (presumably in page scope) by iterating through an ArrayList (�photoList�) using the logic:iterate tag. I can access this bean perfectly well using bean:write to write the �name� property of �photo�. However, when I try to access �photo� as the paramName in a single-parameter html:link tag, I get a null error in my jsp.
(With reference to the below code snippet, the paramProperty, �fileName� is a property of class Photo, which also includes the requisite getter and setter.)
Is there something wrong with the way I've written the html:link tag? Is there something wrong with placing �photo� into page scope using logic:iterate? (I've tried adding an extra bean
efine for �photo�, but it doesn't seem to help.) What's going on here?
Thanks in advance for your suggestions,
John Holme
<logic:iterate name="photoList" id="photo">
<logic
resent name="photo">
<html:linkparamName="photo"
paramId="fileName"
paramProperty="fileName"
page="photo.jsp"
target="main">
<bean:write name="photo" property="name"/><br>
</html:link>
</logic
resent>
</logic:iterate>