So, I'm pretty new to JSP. I tried this in several ways. Ways that would make sense in PHP or automation systems ... I probably think too much really ...
I have a sleeping friend for many associations. This class x has many classes y. In class x view.jsp. I would like to capture the whole class y, where the foreign key y matches the primary key x and displays them. Hibernate seems to correctly put this stuff into a set. Now the question is how can I iterate over this set and then output its contents ...
I'm here somehow stalled. I tried to write a scriptlet,
<% java.util.Iterator iter = aBean.getYs().iter(); // aBeans is the bean name // getYs would return the set and iter would return an iterator for the set while(iter.hasNext) { model.X a = new iter.next() %> <h1><%=a.getTitle()%></h1> <% } %>
It would seem that something should work? Hmmmmmm
source share