Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
10.1.0.Final
-
None
-
User Experience
Description
Performing a typical AJAX call with JQUERY ($.ajax function) to a Servlet from a JSP with method POST and sending a parameter that contains a String with latin characters such as 'ó'.
This is the String that is sent into a parameter:
"Código"
No content type specified so JQUERY.AJAX takes the default one (contentType: 'application/x-www-form-urlencoded, charset=UTF-8').
The received parameter in HttpServletRequest (doPost method) is showed like this:
"C??digo".
In Hex this is the content:
43 3f3f 6469676f (spaces added for better reading pourposes)
This is not UTF-8. The proper encoding should be:
43 c3b3 6469676f (spaces added for better reading pourposes)
Wildfly Configuration:
Subsystems Subsystem: Web/HTTP - Undertow Settings: Servlet/JSP
Default encoding: (empty)
Java encoding: UTF8
Subsystems Subsystem: Web/HTTP - Undertow Settings: HTTP
Url charset: UTF-8