I'm trying to get values from a JSP using getParameter which includes ü,é,à etc. But get wrong values in servlet. I've checked the content type with firebug and found that
Content-Type text/html;charset=UTF-8
checked the POST section with firebug and found the correct value there, when I try to access it in servlet it is wrong. Gives ö instead of ö
req.getCharacterEncoding();
returns null.
Tried with setting
req.setCharacterEncoding("UTF-8");
at the beginning of servlet but didn't help.
edited:
req.getParameter("myValue").getBytes("8859_1"), "utf-8")
above line gives correct value.
at the beginning of servlet but didn't help.