title: Spring boot application Error 400 Bad request on POST
body: <p>I am trying to create a login form that posts 2 parameters (an email and a password). In my controller I am retrieving those parameters through <code>@RequestParam</code> . I've also specified that the method of this controller is <code>POST</code> in <code>@RequestMappig</code>. The problem is that I am getting 400 with the following message:</p>
  
  <p><code>Required String parameter 'email' is not present</code></p>
  
  <p>I've tried getting the params from <code>HttpServletRequest</code> and they are actually missing, but I have no clue why? Can anyone help me out please?</p>
  
  <p>Here is my html :</p>
  
  <pre><code>&lt;div id="form"&gt;
  &lt;form action="/authentication" method="post"&gt;
      &lt;input type="email" value="Email" id="email" onfocus=labelsOnFocus(this) onblur=labelOnDefocus(this) onchange=emailErrorOnTyping(this)&gt;
      &lt;p id = "emailError"&gt;Email not valide&lt;/p&gt;
      &lt;input type="password" value="Password" id="password" onfocus=labelsOnFocus(this) onblur=labelOnDefocus(this) onchange=passwordErrorOnTyping(this)&gt;
      &lt;p id="passwordError"&gt;Password to short&lt;/p&gt;
      &lt;div class="buttons"&gt;
          &lt;input type="submit" value="Login" class="submit"&gt;
          &lt;input type="button" value="Register" class="submit" onclick=register()&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p></p>
  
  <p>And here is my controller:</p>
  
  <pre><code>public String authentication(@RequestParam("email") String email,@RequestParam("password") String password, Model model){
  
      Map&lt;String,String&gt; map = new HashMap&lt;&gt;();
      map.put("email",email);
  .....
  </code></pre>