<logic:iterate id="requirement" name="requirementList" indexId="reqNumber">
<a href="#" onClick="editItem('<%=requirement.service.description%>')">Edit</a>
</logic:iterate>
As you can see, my intention is to populate edit links with a variety of values that are drawn from a list. The "requirement" bean object displays fine with but I'm not sure how to get the value in J开发者_JAVA百科SP which would be much more useful when populating the javascript method calls.
Edit: Using Struts 1.x
If you want to use jsp to retrieve that one, that will be a pain in the ass like this.
((Requirment)pageContext.getAttribute("requirement")).getService().getDesciption();
If you use EL like some other suggested
${requirement.service.description}
精彩评论