title: Need to pass object from one controller to another controller
body: <p>I am having 2 controllers in my class :-1st controller return to a jsp page , in that jsp i am using a form ,on submitting that form it calls 2nd controller . I want to pass one object from 1st controller to 2nd controller and dont want to send that object to intermediate jsp page so is there any way to do this .I dont want to use session attribute also  </p>
  
  <p><strong><em>this is my 1st controller</em></strong></p>
  
  <pre><code>@RequestMapping(value = "/login", method = RequestMethod.GET)
  public static String login(final Model model) {
      final Studentdata studentdata = new Studentdata();
      studentdata.setName("username");
          return "Login" ;
      }
  </code></pre>
  
  <p><strong>this is my Login.Jsp</strong></p>
  
  <pre><code>&lt;form action="/loungeHotel/checkLogin" method="post"&gt;
      &lt;input type="submit" value="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>this is 2nd controller</strong></p>
  
  <pre><code>@RequestMapping(value = "/checkLogin", method = RequestMethod.POST)
  public static String checkLogin(final Model model) {
      System.out.println("here i want to access studentdata");
      return "MyAccount";
  }
  </code></pre>