JSP nested For Loop <p>So I have the following class</p> <pre><code>class User{ int id; int name; //constructor and getters and setters go here } </code></pre> <p>set </p> <pre><code>Set&lt;User&gt; student = new LinkedHashSet&lt;User&gt;(); Set&lt;User&gt; teacher = new LinkedHashSet&lt;User&gt;(); Set&lt;User&gt; other = new LinkedHashSet&lt;User&gt;(); </code></pre> <p>another set</p> <pre><code>Set&lt;Set&lt;User&gt;&gt; finalSet = new LinkedHashSet&lt;Set&lt;User&gt;&gt;(); </code></pre> <p>this contains all the set above</p> <p>how can i print all the value of <code>finalSet</code> in <code>jsp</code> using nested for loop</p> <pre><code>&lt;c:forEach items="${finalSet}" var="each"&gt; &lt;c:forEach items="${finalSet.(what should go here??)}" var="each2"&gt; ${each2.getId()); &lt;/c:forEach&gt; &lt;/c:forEach&gt; </code></pre> <p>How to do this??</p>