title: @RequestAttribute in a Spring MVC project does not fetch the value
body: <p><code>@RequestAttribute</code> in a Spring MVC project doesn't fetch the value.</p>
  
  <p>I use a <em>@ModelAttribute</em>. Here <code>foo</code> attribute is set a value of <code>bar</code></p>
  
  <pre><code>@ModelAttribute  
  void beforeInvokingHandlerMethod(HttpServletRequest request) 
  {  
      request.setAttribute("foo", "bar");  
  }
  </code></pre>
  
  <p>I try to invoke the request attribute value for <code>foo</code> using <code>@RequestAttribute("foo")</code>. But value is null.</p>
  
  <p>Then I try using <code>request.getAttribute("foo")</code> and the value is printed. I don't know what is wrong in the following code:</p>
  
  <pre><code>@RequestAttribute("foo"). 
  @RequestMapping(value="/data/custom", method=RequestMethod.GET)  
  public @ResponseBody String custom(@RequestAttribute("foo") String foo, HttpServletRequest request) {  
      System.out.println("foo value : " + foo);    //null printed  
      System.out.println("request.getAttribute : " + request.getAttribute("foo"));    //value printed  
  
      return foo;  
  }
  </code></pre>