title: Creating a list with c:foreach and placing an onClick listener with a parameter on the items
body: <p>I'm trying to build a list of items in a jsp page in the following way:
  I have a Spring Mvc controller which returns the results of a search in a model. I am able to access objects in this model via the following code in the jsp:</p>
  
  <pre><code>&lt;c:forEach var="listItem" items="${poiList}"&gt;
              &lt;div class="manageListItem"&gt;
                  &lt;table&gt;
                      &lt;tr&gt;
                          &lt;td&gt;&lt;c:out value="${listItem.getName()}"/&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;c:out value="${listItem.getAddress()}"/&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;c:out value="${listItem.getType()}"/&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;c:out value="${listItem.getRating()}"/&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/div&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>The list gets printed nicely. However, I would like each item to become clickable and redirect to a certain page (more like send another request to the controller) on click.</p>
  
  <p>So far, I have tried jquery, but if I don't build the list there, I cannot access a listItem's ID, which would be needed for the request. It would be nice if I could somehow pass it as a parameter with the onClich property of the manageListItem div, but that does not seem possible.
  I could also do the whole thing in jQuery, but this seems cleaner and also, I have no idea on how to access the Model's attributes in jQuery :)</p>
  
  <p>What is the best method to achieve this functionality? </p>