'character encoding of the plain text document was not declared

I am getting "The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature" on hitting my REST endpoint

my jsp header

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" 
</head>

my endpoint

@Path("/create")
@POST
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)


Solution 1:[1]

As mentioned by @lucumt you have a syntax error in your code. the meta tag is not ending correctly in /> - also I corrected the lower case of utf-8 to uppercase:

<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  </head>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 PowerStat