title: Filter list o objects into servlet context in jsp page
body: <p>I have a list of object into the application context and I want to filter this list to get only one element to display jsp page. I tried to filter the list using a stream-filter function:</p>
  
  <pre><code>&lt;c:set var="itemDetalias" value="${applicationScope.productList.stream().filter(p -&gt; p.getId() == item.getProductId()).collect(java.util.stream.Collectors.toList()).get(0)}" /&gt;
  </code></pre>
  
  <p>but I have this error msg: </p>
  
  <p><code>${applicationScope.productList.stream().filter( ppp -&gt; ppp.getId() == item.getProductId()).collect(java.util.stream.Collectors.toList()).get(0)}'</code><br>
  <code>Method not found: class org.apache.el.stream.Stream.collect(null)</code></p>
  
  <p>How could I filter the list ?</p>