It needs the pageEncoding / charset not defined in the header (JSP)
I am writing a JSP program that needs to react to an existing program. It receives several variables that the JSP program must process and generate a response.
The existing program has its own custom headers, for example:
Content-Type: application/x-server-response
But the JSP program is returning its content with the wrong headers. Like this:
Content-Type: application/x-server-response;charset=UTF-8
The part that kills the existing program is the encoding. The program requires you to get a response without typing an encoding at all.
I searched the internet for this question and found more people with the same problem, but these results do not solve the problem.
Is it possible for a JSP program to return its content without encoding?
a source to share
JSP creates text output, so encoding needs to be added. JSP behavior is correct! It seems to be the wrong implementation of the client using the JSP server! The encoding can be ignored, but the implementation seems to have content-type == "application/x-server-response"
(maybe PHP?) Parsing the header correctly instead (see HTTP 1.1 for more information on header formats).
I guess you won't get a JSP mechanism to suppress the content header charset parameter.
a source to share
Have you tried setContentType ("application / x-server-response"). I haven't tested but what the method does.
a source to share