The MIME type multipart/form-data is used to express values submitted through a form. If you open up your network inspector, run this code snippet, and submit the form you should see that the Content-Length is set correctly: The FormData interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method.It uses the same format a form would use if the encoding type were set to "multipart/form-data".. should always return null, as ServletRequest's getAttribute method does not return request/form parameters but attributes set by the servlet context. The fields in the form should have name attributes that match the keys in request.form. Render an HTML template with a