title: Spring - pass parameters through link
body: <p>Suppose I have a list of objects in a Spring web application view. Suppose these objects are forum threads. Each of them has a link, which will move to the page with all topics for this thread. Now in order to list those topics, I will need to retain the thread id which was selected. Part of the .jsp that contains the link:</p>
  
  <pre><code>&lt;h3&gt;&lt;spring:message code="label.threadList"/&gt;&lt;/h3&gt;
  &lt;c:if  test="${!empty threadList}"&gt;
  &lt;table class="data"&gt;
  &lt;tr&gt;
      &lt;th&gt;&lt;spring:message code="label.threadName"/&gt;&lt;/th&gt;
       &lt;th&gt;&lt;spring:message code="label.threadDescription"/&gt;&lt;/th&gt;
      &lt;th&gt;&lt;spring:message code="label.threadTopicCount"/&gt;&lt;/th&gt;
      &lt;th&gt;&lt;spring:message code="label.threadLastModified"/&gt;&lt;/th&gt;
      &lt;th&gt;Go&lt;/th&gt;
  
  &lt;/tr&gt;
  &lt;c:forEach items="${threadList}" var="thread"&gt;
      &lt;tr&gt;
          &lt;td&gt;${thread.name} &lt;/td&gt;
          &lt;td&gt;${thread.description} &lt;/td&gt;
          &lt;td&gt;${thread.topics}&lt;/td&gt;
          &lt;td&gt;${thread.last_modified}&lt;/td&gt;
          &lt;td&gt;&lt;a href="topics.html"&gt;Open&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/c:forEach&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Now, from what I understand, I will need to take the param by request mapping:</p>
  
  <pre><code>@Controller
  public class TopicPageController {
  
      @RequestMapping(value = "/topics", method = RequestMethod.GET)
      public ModelAndView helloWorld(@RequestParam("getId") int getId) {
  
          System.out.println(getId); //here's when I want to see the param
          return new ModelAndView();
      }
  }
  </code></pre>
  
  <p>What I can't get right, is passing it. How can I include, that on clicking this link, the request will get that parameter?</p>