Question

How do I select a specific object from the action class when pulling up multiple objects in JSP.

From my action class I pass through Struts five of the same object. In JSP how would I select a specific object and property of the object to display on page. I have tried putting various values and names in the <s:form> tag but I have yet to figure out how to do it. A push in the corrected Direction would be welcome.

Was it helpful?

Solution

Use

<s:iterator value="walkthroughs" >
    <s:property value="id"/><br>
    <s:property value="areaName"/><br>
...
</s:iterator>

And you should rename your getter methods to be bean compartible.

getId(), getAreaName()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top