<%
String catCatId; %>
<logic:iterate id="category" name="categories">
<% catCatId = category.getId(); %>
Place rest for <bean:write > and HTML here for category
<logic:iterate id="idea" name="ideas" >
<% if (catCatID.equals(idea.getCatId())) { %>
Place rest for <bean:write > and HTML here for idea
<% } %>
</logic:literate>
</logic:literate>