title: What is the Scope of Bean declared in @ModelAttribute annotation
body: <p>I have a table having 40 columns and one bean corresponding to that table. But on page I am displaying only 10 fields. When the page is rendered, by debugging, I can see the bean is getting populated by all fields from the table and I am adding it in Model using <code>model.addAttribute("emp", emp)</code> . But after changing some fields on page, when I submit the page again, I see only those fields are getting populated who are appearing on the page. Rest are not though the bean is in "session" scope.</p>
  
  <p>I have one controller which is called when I submit the page. Thats something like below</p>
  
  <pre><code>@RequestMapping({"/update.html"})
  public String updateData(@ModelAttribute("emp") Employee emp){
      // All fields of Employee bean are not getting populated
  }
  </code></pre>
  
  <p>I wrote in JSP something like below.</p>
  
  <pre><code>&lt;jsp:useBean class="com.Employee" id="emp"
      scope="request" /&gt;
  </code></pre>
  
  <p>Note :- I tested with scope="session" as well.</p>
  
  <p>So my question is, Even after putting bean in SESSION scope, why I am not getting it in my controller. So is @ModelAttribute changing my bean scope any how??</p>