title: Maintain data in redirection between different URLs in spring controller
body: <p>I have just started to learn Spring MVC. So, sorry if my beginner level irritates you.</p>
  
  <p>To have my question short and clear i am using following simple code example.</p>
  
  <p>i have two functions in two different spring MVC controllers.
  In first controller, i am having:</p>
  
  <pre><code>@RequestMapping("/first")
  public String first(Model model){
      model.addAttribute("user", "User Name");
      return "redirect:/second";
  }
  </code></pre>
  
  <p>In second controller i am having:</p>
  
  <pre><code>@RequestMapping("/second")
  public String second(){
      return "myView";
  }
  </code></pre>
  
  <p>Actually the first is redirecting to the second. Bt in my view(html), when i try to get model's value like:</p>
  
  <pre><code>&lt;h1&gt;Welcome! ${user} &lt;h1&gt;   //code in html to get user object
  </code></pre>
  
  <p>It shows empty.</p>
  
  <p>So my question is how to transfer data when you are redirecting between two requests in spring MVC. what is the best solution to achieve this. Can i achieve this by <strong>Model</strong> or some other approach is there...?
  Thanks in advance</p>