Who pass Spring ModelMap as parameter to controller method?
<p>I searched stackoverflow, spring specification, and just google for a long time but still cannot find the answer.</p>

<p>For example, </p>

<p>-------------------Example Method #1------------------------</p>

<pre><code>@RequestMapping(value = "/login")

public String handleLogin(ModelMap model, @RequestParam String name){
  model.addAttribute("name", name);
  return "login";
}
</code></pre>

<hr>

<p>In above method, </p>

<ol>
<li>Who calls this method and in what situation?</li>
<li>What did the caller do to the model before it calls this method?</li>
<li>Which scope is this ModelMap object in? is it in request scope?</li>
<li>What is the requirements of the signature of this type of method?
Can I arbitrarily create a method like following:</li>
</ol>

<p>------------------Example Method #2-------------------------</p>

<pre><code>@RequestMapping(value = "/login")

public String handleLogin(String s1, ModelMap model_1, int i, ModelMap model_2 @RequestParam String name){
  model_1.addAttribute("name", name);
  model_2.addAttribute("company", "good");//what are the initial status of model_1 and model_2?
  return "login";
}
</code></pre>

<p>In this method, I put 2 ModelMap parameters and the positions of them are arbitrary. Can the spring framework call this method so the modelmap can be used to carry data to a view just like the regular case in Example Method #1?</p>

<p>Generally can anyone illustrate the details of the life cycle of ModelMap before it is passed into the method?</p>