title: Skip x loop with JSP
body: <p>I have four foreach loops with JSP that loop over the same series of content for layout purposes, what I'm looking to do is run these loops so one of them only displays the content every 4 loops, and the others display the content every 3 loops, 2, and so on. I'm trying to avoid repeated content. </p>
  
  <p>This was my attempt, but using modulos don't seem to be working for me.</p>
  
  <pre><code>&lt;div class="col-xs-3 hidden-sm hidden-xs"&gt;
    &lt;c:forEach var="item" items="${items}" begin="0" varStatus="status"&gt;
      &lt;c:set var="item" value="${item}" scope="request" /&gt;
      &lt;c:if test="${status.index % 1 == 0}"&gt;
        &lt;%@ include file="desktop-include.jsp" %&gt;
      &lt;/c:if&gt;
    &lt;/c:forEach&gt;
  &lt;/div&gt;
  
  &lt;div class="col-xs-3 hidden-sm hidden-xs"&gt;
    &lt;c:forEach var="item" items="${items}" begin="0" varStatus="status"&gt;
      &lt;c:set var="item" value="${item}" scope="request" /&gt;
      &lt;c:if test="${status.index % 2 == 0}"&gt;
        &lt;%@ include file="desktop-include.jsp" %&gt;
      &lt;/c:if&gt;
    &lt;/c:forEach&gt;
  &lt;/div&gt;
  
  &lt;div class="col-xs-3 hidden-sm hidden-xs"&gt;
    &lt;c:forEach var="item" items="${items}" begin="0" varStatus="status"&gt;
      &lt;c:set var="item" value="${item}" scope="request" /&gt;
      &lt;c:if test="${status.index % 3 == 0}"&gt;
        &lt;%@ include file="desktop-include.jsp" %&gt;
      &lt;/c:if&gt;
    &lt;/c:forEach&gt;
  &lt;/div&gt;
  
  &lt;div class="col-xs-3 hidden-sm hidden-xs"&gt;
    &lt;c:forEach var="item" items="${items}" begin="0" varStatus="status"&gt;
      &lt;c:set var="item" value="${item}" scope="request" /&gt;
      &lt;c:if test="${status.index % 4 == 0}"&gt;
        &lt;%@ include file="desktop-include.jsp" %&gt;
      &lt;/c:if&gt;
    &lt;/c:forEach&gt;
  &lt;/div&gt;
  </code></pre>