title: Neither BindingResult nor plain target object for bean name 'user' available as request attribute
body: <p>below is my JSP and controller classes while i am running my application in tomcat i am getting this exception.</p>
  
  <pre><code>&lt;form:form action="userDetails" method="post" commandName="user"&gt;
    &lt;form:label path="firstName"&gt;First Name&lt;/form:label&gt;
    &lt;form:input path="firstName"/&gt;&lt;br/&gt;
    &lt;form:label path="lastName"&gt;Last Name&lt;/form:label&gt;
    &lt;form:input path="lastName"/&gt;&lt;br/&gt;
    &lt;form:label path="nickName"&gt;Nick Name&lt;/form:label&gt;
    &lt;form:input path="nickName"/&gt;&lt;br/&gt;
    &lt;form:label path="emailAddress"&gt;Email Address&lt;/form:label&gt;
    &lt;form:input path="emailAddress"/&gt;&lt;br/&gt;
    &lt;input type="submit" value="submit"/&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>@RequestMapping(value="userDetails",method=RequestMethod.GET)
      public String getEmployeeDetailsPost(@ModelAttribute("user")User user,ModelMap map){
          map.put("firstName", user.getFirstName());
          map.put("lastName", user.getLastName());
          map.put("nicName", user.getNickName());
          map.put("email", user.getEmailAddress());
          return "success";
      }
  </code></pre>