Before you mark my question as duplicate with this question, I want to say that I read it and also this post.
However, I do sth wrong and I continue to read in a wrong format the data from the form in my jsp (with POST method). What I have done:
1. In my JSP, I have put this
<%@page contentType="text/html" pageEncoding="UTF-8" language="java" %>
and in the header this <meta charset="UTF-8">
2. In the servlet
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//...
//code
//...
request.setCharacterEncoding("UTF-8");
/*if (request.getCharacterEncoding() == null) {
request.setCharacterEncoding("UTF-8");
}
*/
//...
//code
//...
s1 = request.getParameter(kname1); //<-here I read the value from the JSP and get finally this ÎÏδÏαδαÏ
}
3. In the web.xml I have <?xml version="1.0" encoding="UTF-8"?>
What I missed here??