title: how to display only 4 items per rows using struts2 ognl tag
body: <p>i am trying to display 4 values in a single tr and next four values in next tr. But with my below code all the values are showing in a single tr with long horizontal scroll.</p>
  
  <p>I want to show my list values : 4 values in each row and next 4 values in next tr</p>
  
  <p>Please check my code  and tell me the logic to solve my problem.. </p>
  
  <pre><code>&lt;s:if test="themes.size() &gt; 0"&gt;  
     &lt;table&gt; 
        &lt;s:iterator value="themes" status="userStatus"&gt; 
                 &lt;tr&gt; 
                          &lt;td height="90%"&gt; 
                   &lt;s:property value="themeName" /&gt;                     
                          &lt;/td&gt; 
                 &lt;/tr&gt;     
  
       &lt;/s:iterator&gt;  
  &lt;/table&gt;   
  </code></pre>
  
  <p> </p>
  
  <p><strong>What i tried is the below code:</strong></p>
  
  <pre><code> `&lt;s:if test="themes.size() &gt; 0"&gt;  
        &lt;table&gt;  
           &lt;s:set var="index" value="%{0}" /&gt;
                 &lt;tr&gt; 
                     &lt;s:iterator value="themes" status="userStatus"&gt; 
                          &lt;td height="90%"&gt;
                                   &lt;s:property value="themeName" /&gt; 
                          &lt;/td&gt;  
                           &lt;s:set var="newindex" value="%{1 + #attr.index}" /&gt;   
                              &lt;s:if test="#attr.newindex %4==0"&gt;
                                  &lt;/tr&gt;&lt;tr&gt;
                               &lt;/s:if&gt; 
                    &lt;/s:iterator&gt;  
                 &lt;/tr&gt;      
            &lt;/table&gt;   
        &lt;/s:if&gt; 
  </code></pre>