In my servlet I save to a String variable, a value which I get form a form (with POST) in my JSP page.This value sometimes isn't in English..
s1 = request.getParameter("Country");
Then to test, what I just read I print it to the log screen and I got $%^&
when it isn't in English. I tried to add
<%@page contentType="text/html" pageEncoding="UTF-8" language="java" %>
in my jsp page and I also checked if there is this in the server.xml
URIEncoding="utf-8"
But It did't change anything.. What can i do?
EDIT
I added to my servlet the following
if (request.getCharacterEncoding() == null) {
request.setCharacterEncoding("UTF-8");
}
inside the protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
but i still have the problem