title: Tomcat 8.5: Required String parameter '...' is not present
body: <p>During upgrade from Tomcat 7.0.50 to Tomcat 8.5.15 it stopped recognizing one of the POST parameters of one of my methods: what I get instead of the normal response is this message</p>
  <blockquote>
  <p><strong>HTTP Status [400] – [Bad Request]</strong></p>
  <p><strong>Type</strong> Status Report</p>
  <p><strong>Message</strong> Required String parameter 'password' is not present</p>
  <p><strong>Description</strong> The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).</p>
  <p><strong>Apache Tomcat/8.5.15</strong></p>
  </blockquote>
  <p>The method signature is:</p>
  <pre><code>@RequestMapping(value = &quot;/login&quot;, method = RequestMethod.POST)
  @ResponseBody
  public Map&lt;String, Object&gt; login(
      @RequestParam(&quot;password&quot;) String passwordHash,
      @RequestParam(&quot;username&quot;) String loginName,
      @RequestParam(value = &quot;clientId&quot;, required = false) String clientId,
      HttpServletRequest request,
      HttpServletResponse response)
      throws NoSuchAlgorithmException {//...
  </code></pre>
  <p>I've captured traffic from the request and, as you can see, the <code>password</code> POST parameter is contained in POST <code>x-www-form-urlencoded</code> parameters:</p>
  <pre><code>POST http://&lt;masked&gt;/Server/user/login HTTP/1.1
  Host: &lt;masked&gt;
  Connection: keep-alive
  Content-Length: 270
  Origin: http://&lt;masked&gt;
  X-Requested-With: ShockwaveFlash/26.0.0.131
  User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36
  Content-Type: application/x-www-form-urlencoded
  Accept: */*
  Referer: http://&lt;masked&gt;
  Accept-Encoding: gzip, deflate
  Accept-Language: en-US,en;q=0.8,ru;q=0.6,he;q=0.4
  Cookie: &lt;masked&gt;
  
  noremember=true&amp;password=C9TUq%2BYMIbeoW%2ByfoSCt9QJoOnmSGR8BqRKdOjufjE7%2FoHUDpPf3FHSvCUbZu4EBSKkJV2ryGs1Q77D7SFbBKZZ3joWcMTN6aTsgmPsOdW0Md1qcOkB4w4L3F53XZRlKUp2RaxCjoE0AIr%2B0WLomGFSrn8u8iTf2p4Z7Mo6ZKPA%3D&amp;username=test%40example%2Ecom&amp;clientId=1858390758%2E1481631908
  </code></pre>
  <p>The strange this is that it worked perfectly under Tomcat 7</p>
  <p>How can this be helped?</p>