title: How to use the index variable of a JSTL forEach loop to access a map entry?
body: <p>With a forEach loop I'd like to create table cells (for a row) whereas each cell contains an input field of a form. The number of table cells is always fixed (12). That is actually no problem. However, here comes the challenge: the forEach should also enter a variable number of default values into the input fields that have to be obtained from a Map(Long, Double).</p>
  
  <p>This is my (simplified) attempt:</p>
  
  <pre><code>&lt;c:forEach var="number" begin="1" end="12" &gt;
    &lt;td&gt;
        &lt;input type="text" value="${requestScope.aMapWithData[number]}" /&gt; 
    &lt;/td&gt; 
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>But this doesn't show any value from the Map in the input fields. I guess the problem is that "number" is of type String and not Long. So I wonder if this problem can be solved without using scriptlets.</p>