title: How does @ModelAttribute send data to jsp
body: <p>I have a query. I am using <code>@ModelAttribute</code> on a function in a <code>formController</code>. </p>
  
  <pre><code>@ModelAttribute("modelAttrVar")
  public ModelAttr function(){
      ModelAttr obj = new ModelAttr();
      //...code
      return obj;
  }
  </code></pre>
  
  <p>But this model attribute is not added to the ModelAndView I am returning.....</p>
  
  <pre><code>public ModelAndView func2(){
      ModelAndView obj = new ModelAndView();
      obj.addAttribute("variableName" , value);
      obj.setViewName("viewName");
      return obj;
  }
  </code></pre>
  
  <p>Now when I see the jsp then the model Attribute variable <code>modelAttrVar</code> is available in jsp and is giving values. How ??</p>
  
  <p>Please Help!!</p>