title: Spring MVC How take the parameter value of a GET HTTP Request in my controller method?
body: <p>In this period I am studing the Spring MVC showcase example (downloadable from STS dasboard) and I have some simple question about the <code>Request Mapping</code> examples:</p>
  
  <p>1) In my <code>home.jsp</code> page I have this link:</p>
  
  <pre><code>        &lt;li&gt;
              &lt;a id="byParameter" class="textLink" href="&lt;c:url value="/mapping/parameter?foo=bar" /&gt;"&gt;By path, method, and presence of parameter&lt;/a&gt;
          &lt;/li&gt;
  </code></pre>
  
  <p>As you can see by this link I am doing an HTTP GET Request having a "foo" parameter containing the value: "bar".</p>
  
  <p>This HTTP Request is handled by the following method of the controller class MappingController:</p>
  
  <pre><code>@RequestMapping(value="/mapping/parameter", method=RequestMethod.GET, params="foo")
  public @ResponseBody String byParameter() {
      return "Mapped by path + method + presence of query parameter! (MappingController)";
  }
  </code></pre>
  
  <p>This method manage HTTP Request (only <code>GET</code> type) that have a parameter named "foo"</p>
  
  <p>How can I take the value ("bar") of this parameter and put it in a variable inside the code of my by Parameter method?</p>