title: Set a value in JSP passed from javascript to a modal for JSTL
body: <p>I have this javascript defining what happens when a user clicks on a button:</p>
  
  <pre><code>   $(document).on("click", ".open-ViewResultsModal", function () {
         var versionNumber = $(this).data('id');
         $(".modal-body #versionNumber").val(versionNumber);
         $('#viewResultsModal').modal('show');
     }); 
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input type="hidden" id="versionNumber" name="versionNumber" value="work plz"/&gt;  
  </code></pre>
  
  <p>This works fine in that the versionNumber input I have defined in my modal gets the correct value. However, I don't know how to use that to do the JSTL logic I have to do:</p>
  
  <pre><code>  &lt;c:forEach var="result" items="${array[&lt;versionNumber&gt;]}"&gt;
   ...
    &lt;/c:forEach&gt;
  </code></pre>
  
  <p>I have been trying and failing to somehow get the value of the input into that  variable I'm using in my for loop. I read about using the implicit param variable to pass this kind of information, but I don't know how that is done in this context.</p>