title: How to filter last entries with JSP c:forEach and c:if?
body: <p>I'm trying to develop a Spring MVC application with JSP pages and I've run into a problem. It's more of a creativity problem than a code problem, but here goes:</p>
  
  <p>So the application basically recieves a recipe (fields Name, Problem Description, Problem Solution, etc) and slaps an ID on it as it is created.</p>
  
  <p>What I want is to show on the front page the <strong>last</strong> 3 recipes created. I've come up with a code that apparently shows the <strong>first</strong> 3 recipes created:</p>
  
  <pre><code>&lt;c:forEach var="recipe" items='${recipes}'&gt;
      &lt;c:if test="${recipe.id &lt; 4}
          &lt;div class="span4"&gt;
              &lt;h3&lt;c:out value="${recipe.inputDescProb}"&gt;&lt;/c:out&gt;&lt;/h3&gt;
              &lt;p&gt;&lt;c:out value="${recipe.inputDescSol}"&gt;&lt;/c:out&gt;&lt;/p&gt;
              &lt;p&gt;&lt;a class="btn" href="/recipes/${recipe.id}"&gt;Details &amp;raquo&lt;/a&gt;&lt;/p&gt;
          &lt;/div&gt;
      &lt;/c:if&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>Any ideas on how to show the <strong>last</strong> 3 recipes created instead?</p>