title: Spring MVC Missing request attribute
body: <p>So i'm currently taking a course on udemy about Spring MVC. In the current section there's a simple form being build to submit firstname and lastname.</p>
  
  <pre><code>Hey user, may i know your name?
  &lt;form:form action="hello" modelAttribute="info"&gt;
      First Name: &lt;form:input path="firstName" /&gt;
      Last Name: &lt;form:input path="lastName" /&gt;
      &lt;input type="submit" value="Submit" /&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p>The input gets submitted via an Information Class to the HelloController</p>
  
  <pre><code>@Controller
  public class HelloController {
  
  @RequestMapping("/hello")
  public ModelAndView helloWorld(@RequestAttribute("info") Information userInfo) {
      ModelAndView model = new ModelAndView("hello");
  
      model.addObject("firstName", userInfo.getFirstName());
      model.addObject("lastName", userInfo.getLastName());
  
      return model;
  }
  
  @RequestMapping("/")
  public ModelAndView homepage() {
      ModelAndView model = new ModelAndView("index", "info", new Information());
  
      return model;
  }
  </code></pre>
  
  <p>Information Class:</p>
  
  <pre><code>public class Information {
  private String firstName;
  private String lastName;
  
  public String getFirstName() {
      return firstName;
  }
  public void setFirstName(String firstName) {
      this.firstName = firstName;
  }
  public String getLastName() {
      return lastName;
  }
  public void setLastName(String lastName) {
      this.lastName = lastName;
  }   
  }
  </code></pre>
  
  <p>Next the informatiion Class should be forwarded to the view file hello.jsp</p>
  
  <pre><code>&lt;body&gt;
  &lt;h2&gt; Hello ${firstName} ${lastName} &lt;/h2&gt;&lt;br/&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>I thought this is actually rather simple, but after submitting the form i get the exception "Missing request attribute 'info' of type Information". I double-checked my code against the code from the udemy instructor, but couldn't find any errors. Can someone help?</p>
  
  <p>On a sidenote, i don't know if it has anything todo with this error, but after adding <code>@Controller</code>to the Class, auto-completion in eclipse stops working for this Class. After removing the annotation auto-completion starts towork again.</p>